public abstract class Syntax extends java.lang.Object implements 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(java.lang.Object form,
Translator tr) |
Expression |
rewriteForm(Pair form,
Translator tr) |
boolean |
scanForDefinitions(Pair st,
java.util.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(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 invokation)tr
- the Translator that provides contextpublic Expression rewriteForm(java.lang.Object form, Translator tr)
public Expression rewriteForm(Pair form, Translator tr)
public void scanForm(Pair st, ScopeExp defs, Translator tr)
public boolean scanForDefinitions(Pair st, java.util.Vector forms, ScopeExp defs, Translator tr)
st
- the statement to checkforms
- where to append the (possibly-modified) statementdefs
- where to add Declarations for found definitionstr
- the compilation state