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 Object
Same as regular append, but handle SyntaxForm wrappers.protected Expression
coerceExpression
(Object val, Translator tr) static Object
A wrapper around LList.consX to make it a "variable-arg method".protected Object
expand
(Object template, int depth, Translator tr) protected boolean
protected Expression
leaf
(Object val, Translator tr) static Symbol
makeSymbol
(Namespace ns, Object local) protected boolean
matchesQuasiQuote
(Object form, SyntaxForm syntax, Translator tr) protected boolean
matchesUnquote
(Pair pair, SyntaxForm syntax, Translator tr) protected boolean
matchesUnquoteSplicing
(Pair pair, SyntaxForm syntax, Translator tr) static Object
Quote an object (without namespace-expansion).static Object
quote
(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:Syntax
Re-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.
-