Package kawa.lang
Class Quote
java.lang.Object
kawa.lang.Syntax
kawa.lang.Quote
- All Implemented Interfaces:
gnu.kawa.format.Printable,Named
- Direct Known Subclasses:
syntax
The Syntax transformer that re-writes the "quote" "quasiquote" primitive.
In both cases recursively resolves SyntaxForm wrappers and resolves
namespaces of symbols. In the case of quasiquote also handles unquoting.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ObjectSame as regular append, but handle SyntaxForm wrappers.protected ExpressioncoerceExpression(Object val, Translator tr) static ObjectA wrapper around LList.consX to make it a "variable-arg method".protected Objectexpand(Object template, int depth, Translator tr) protected booleanprotected Expressionleaf(Object val, Translator tr) static SymbolmakeSymbol(Namespace ns, Object local) protected booleanmatchesQuasiQuote(Object form, SyntaxForm syntax, Translator tr) protected booleanmatchesUnquote(Pair pair, SyntaxForm syntax, Translator tr) protected booleanmatchesUnquoteSplicing(Pair pair, SyntaxForm syntax, Translator tr) static ObjectQuote an object (without namespace-expansion).static Objectquote(Object obj, Translator tr) Quote an object (without namespace-expansion).rewrite(Object obj, Translator tr) Re-write an expression that is an "application" of this Syntax object.Methods inherited from class kawa.lang.Syntax
getName, getSymbol, print, rewriteForm, scanForDefinitions, scanForm, setName, setName
-
Field Details
-
plainQuote
-
quasiQuote
-
QUOTE_DEPTH
protected static final int QUOTE_DEPTHAn initial value for 'depth' for plain (non-quasi) quote.- See Also:
-
isQuasi
protected boolean isQuasiTrue for quasiquote; false for plain quote.
-
-
Constructor Details
-
Quote
-
-
Method Details
-
matchesUnquote
-
matchesUnquoteSplicing
-
matchesQuasiQuote
-
expand
-
quote
Quote an object (without namespace-expansion). Basically just recursively removes SyntaxForm wrappers. -
quote
Quote an object (without namespace-expansion). Basically just recursively removes SyntaxForm wrappers. -
coerceExpression
-
leaf
-
expandColonForms
protected boolean expandColonForms() -
makeSymbol
-
rewrite
Description copied from class:SyntaxRe-write an expression that is an "application" of this Syntax object. -
consX$V
A wrapper around LList.consX to make it a "variable-arg method". -
append$V
Same as regular append, but handle SyntaxForm wrappers.
-