|
|||||
| FRAMES NO FRAMES | |||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||
This class mutates the Java AST, whilst it is still a Java AST, in readiness for conversion to Groovy, yippee-ky-a !
| Field Summary | |
|---|---|
Stack |
stack
|
def |
tokenNames
|
| Constructor Summary | |
PreJava2GroovyConverter(def tokenNames)
|
|
| Method Summary | |
|---|---|
GroovySourceAST |
getGrandParentNode()
|
GroovySourceAST |
getParentNode()
|
GroovySourceAST |
pop()
|
void |
push(GroovySourceAST t)
|
void |
swapTwoChildren(GroovySourceAST t)
To swap two children of node t... |
void |
visitDefault(GroovySourceAST t, int visit)
|
void |
visitJavaArrayInit(GroovySourceAST t)
|
void |
visitJavaLiteralDo(GroovySourceAST t)
|
| Constructor Detail |
|---|
public PreJava2GroovyConverter(def tokenNames)
| Method Detail |
|---|
GroovySourceAST getGrandParentNode()
GroovySourceAST getParentNode()
public GroovySourceAST pop()
public void push(GroovySourceAST t)
public void swapTwoChildren(GroovySourceAST t)
(t)
|
|
(a) -- (b)
t.down = firstNode
a.right = b
b.right = null
becomes
(t)
|
|
(b) -- (a)
t.down = b
a.right = null
b.right = a
todo - build API of basic tree mutations like this method.
public void visitDefault(GroovySourceAST t, int visit)
void visitJavaArrayInit(GroovySourceAST t)
void visitJavaLiteralDo(GroovySourceAST t)