| java.lang.Object kawa.lang.Syntax kawa.lang.Quote
All known Subclasses: kawa.standard.syntax,
Quote | public class Quote extends Syntax (Code) | | 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.
author: Per Bothner |
Constructor Summary | |
public | Quote(String name, boolean isQuasi) |
Method Summary | |
public static Object | append$V(Object[] args) Same as regular append, but handle SyntaxForm wrappers. | protected Expression | coerceExpression(Object val, Translator tr) | public static Object | consX$V(Object[] args) A wrapper around LList.consX to make it a "variable-arg method". | protected Object | expand(Object template, int depth, Translator tr) | Object | expand(Object template, int depth, SyntaxForm syntax, Object seen, Translator tr) Backquote-expand a template. | protected boolean | expandColonForms() | Object | expand_pair(Pair list, int depth, SyntaxForm syntax, Object seen, Translator tr) | protected Expression | leaf(Object val, Translator tr) | public static Object | quote(Object obj, Translator tr) Quote an object (without namespace-expansion).
Basically just recursively removes SyntaxForm wrappers. | public static Object | quote(Object obj) Quote an object (without namespace-expansion).
Basically just recursively removes SyntaxForm wrappers. | public Expression | rewrite(Object obj, Translator tr) |
QUOTE_DEPTH | final protected static int QUOTE_DEPTH(Code) | | An initial value for 'depth' for plain (non-quasi) quote.
|
isQuasi | protected boolean isQuasi(Code) | | True for quasiquote; false for plain quote.
|
append$V | public static Object append$V(Object[] args)(Code) | | Same as regular append, but handle SyntaxForm wrappers.
|
consX$V | public static Object consX$V(Object[] args)(Code) | | A wrapper around LList.consX to make it a "variable-arg method".
|
expand | Object expand(Object template, int depth, SyntaxForm syntax, Object seen, Translator tr)(Code) | | Backquote-expand a template.
Parameters: template - the quasiquoted template to expand Parameters: depth - - the (net) number of quasiquotes we are inside.The value QUOTE_DEPTH is a special case when we're insidea quote rather than a quasiquote. Parameters: tr - the rewrite context the expanded Expression (the result can be a non-expression,in which case it is implicitly a QuoteExp). |
expandColonForms | protected boolean expandColonForms()(Code) | | |
quote | public static Object quote(Object obj, Translator tr)(Code) | | Quote an object (without namespace-expansion).
Basically just recursively removes SyntaxForm wrappers.
|
quote | public static Object quote(Object obj)(Code) | | Quote an object (without namespace-expansion).
Basically just recursively removes SyntaxForm wrappers.
|
|
|