Package kawa.lang
Class Macro
- java.lang.Object
-
- kawa.lang.Syntax
-
- kawa.lang.Macro
-
- All Implemented Interfaces:
gnu.kawa.format.Printable,Named,Externalizable,Serializable
public class Macro extends Syntax implements gnu.kawa.format.Printable, Externalizable
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description Objectexpanderstatic intHYGIENICstatic intSKIP_SCAN_FORMIf this flag is set, then don't expand during the scan-body phase.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Objectexpand(Object form, Translator tr)ScopeExpgetCapturedScope()booleanisHygienic()static Macromake(Declaration decl)static Macromake(Object name, Procedure expander)static Macromake(Object name, Procedure expander, Object instance)static MacromakeNonHygienic(Object name, Procedure expander)static MacromakeNonHygienic(Object name, Procedure expander, Object instance)static MacromakeSkipScanForm(Object name, Procedure expander, Object instance)voidprint(Consumer out)voidreadExternal(ObjectInput in)ExpressionrewriteForm(Pair form, Translator tr)ObjectrewriteIfNeeded()voidscanForm(Pair st, ScopeExp defs, Translator tr)voidsetCapturedScope(ScopeExp scope)voidsetFlags(int flags)voidsetHygienic(boolean hygienic)StringtoString()voidwriteExternal(ObjectOutput out)
-
-
-
Field Detail
-
expander
public Object expander
-
HYGIENIC
public static final int HYGIENIC
- See Also:
- Constant Field Values
-
SKIP_SCAN_FORM
public static final int SKIP_SCAN_FORM
If this flag is set, then don't expand during the scan-body phase.- See Also:
- Constant Field Values
-
-
Method Detail
-
setFlags
public final void setFlags(int flags)
-
isHygienic
public final boolean isHygienic()
-
setHygienic
public final void setHygienic(boolean hygienic)
-
getCapturedScope
public ScopeExp getCapturedScope()
-
setCapturedScope
public void setCapturedScope(ScopeExp scope)
-
make
public static Macro make(Declaration decl)
-
makeNonHygienic
public static Macro makeNonHygienic(Object name, Procedure expander, Object instance)
-
makeSkipScanForm
public static Macro makeSkipScanForm(Object name, Procedure expander, Object instance)
-
rewriteForm
public Expression rewriteForm(Pair form, Translator tr)
- Overrides:
rewriteFormin classSyntax
-
print
public void print(Consumer out)
-
rewriteIfNeeded
public Object rewriteIfNeeded()
-
expand
public Object expand(Object form, Translator tr)
-
scanForm
public void scanForm(Pair st, ScopeExp defs, Translator tr)
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
-