public abstract class Syntax extends java.lang.Object implements gnu.kawa.format.Printable, Named
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getName() |
java.lang.Object |
getSymbol() |
void |
print(Consumer out) |
Expression |
rewrite(java.lang.Object obj,
Translator tr)
Re-write an expression that is an "application" of this Syntax object.
|
Expression |
rewriteForm(Pair form,
Translator tr) |
boolean |
scanForDefinitions(Pair st,
ScopeExp defs,
Translator tr)
Check if a statement is a definition, for initial pass.
|
void |
scanForm(Pair st,
ScopeExp defs,
Translator tr) |
void |
setName(java.lang.Object name) |
void |
setName(java.lang.String name) |
public void setName(java.lang.Object name)
public Expression rewrite(java.lang.Object obj, Translator tr)
obj
- the arguments to this "application" (i.e. the cdr of
the macro/builtin invocation)tr
- the Translator that provides contextpublic Expression rewriteForm(Pair form, Translator tr)
public void scanForm(Pair st, ScopeExp defs, Translator tr)
public boolean scanForDefinitions(Pair st, ScopeExp defs, Translator tr)
st
- the statement to checkdefs
- where to add Declarations for found definitionstr
- the compilation statepublic void print(Consumer out)
print
in interface gnu.kawa.format.Printable