|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectkawa.lang.Syntax
kawa.lang.Quote
public class Quote
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 | |
---|---|
protected boolean |
isQuasi
True for quasiquote; false for plain quote. |
static Quote |
plainQuote
|
static Quote |
quasiQuote
|
protected static int |
QUOTE_DEPTH
An initial value for 'depth' for plain (non-quasi) quote. |
Constructor Summary | |
---|---|
Quote(java.lang.String name,
boolean isQuasi)
|
Method Summary | |
---|---|
static java.lang.Object |
append$V(java.lang.Object[] args)
Same as regular append, but handle SyntaxForm wrappers. |
protected Expression |
coerceExpression(java.lang.Object val,
Translator tr)
|
static java.lang.Object |
consX$V(java.lang.Object[] args)
A wrapper around LList.consX to make it a "variable-arg method". |
protected java.lang.Object |
expand(java.lang.Object template,
int depth,
Translator tr)
|
protected boolean |
expandColonForms()
|
protected Expression |
leaf(java.lang.Object val,
Translator tr)
|
static java.lang.Object |
quote(java.lang.Object obj)
Quote an object (without namespace-expansion). |
static java.lang.Object |
quote(java.lang.Object obj,
Translator tr)
Quote an object (without namespace-expansion). |
Expression |
rewrite(java.lang.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, rewriteForm, scanForDefinitions, scanForm, setName, setName |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Quote plainQuote
public static final Quote quasiQuote
protected static final int QUOTE_DEPTH
protected boolean isQuasi
Constructor Detail |
---|
public Quote(java.lang.String name, boolean isQuasi)
Method Detail |
---|
protected java.lang.Object expand(java.lang.Object template, int depth, Translator tr)
public static java.lang.Object quote(java.lang.Object obj, Translator tr)
public static java.lang.Object quote(java.lang.Object obj)
protected Expression coerceExpression(java.lang.Object val, Translator tr)
protected Expression leaf(java.lang.Object val, Translator tr)
protected boolean expandColonForms()
public Expression rewrite(java.lang.Object obj, Translator tr)
Syntax
rewrite
in class Syntax
obj
- the arguments to this "application" (i.e. the cdr of
the macro/builtin invokation)tr
- the Translator that provides context
public static java.lang.Object consX$V(java.lang.Object[] args)
public static java.lang.Object append$V(java.lang.Object[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |