kawa.lang
public abstract class Syntax extends Object implements Printable, Named
| Constructor Summary | |
|---|---|
| Syntax() | |
| Syntax(Object name) | |
| Method Summary | |
|---|---|
| String | getName() |
| Object | getSymbol() |
| void | print(Consumer out) |
| Expression | rewrite(Object obj, Translator tr)
Re-write an expression that is an "application" of this Syntax object. |
| Expression | rewriteForm(Object form, Translator tr) |
| Expression | rewriteForm(Pair form, Translator tr) |
| boolean | scanForDefinitions(Pair st, Vector forms, ScopeExp defs, Translator tr) Check if a statement is a definition, for initial pass.
|
| void | scanForm(Pair st, ScopeExp defs, Translator tr) |
| void | setName(Object name) |
| void | setName(String name) |
Parameters: obj the arguments to this "application" (i.e. the cdr of the macro/builtin invokation) tr the Translator that provides context
Returns: the re-written expression
Parameters: st the statement to check forms where to append the (possibly-modified) statement defs where to add Declarations for found definitions tr the compilation state
Returns: true on success