Deprecated
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private GroovySourceAST | |
| public GroovySourceAST | |
| public void | |
| public void | |
| public void | visitDefault(GroovySourceAST t, int visit)
Overrides org. Implements org. |
| private void | |
| private void |
| stack | back to summary |
|---|---|
| private final Stack<E> stack | |
| PreJava2GroovyConverter | back to summary |
|---|---|
| public PreJava2GroovyConverter(String[] tokenNames) | |
| getGrandParentNode | back to summary |
|---|---|
| private GroovySourceAST getGrandParentNode() | |
| pop | back to summary |
|---|---|
| public GroovySourceAST pop() Overrides org. Implements org. | |
| push | back to summary |
|---|---|
| public void push(GroovySourceAST t) Overrides org. Implements org. | |
| swapTwoChildren | back to summary |
|---|---|
| public void swapTwoChildren(GroovySourceAST t) To swap two children of node 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.
| |
| visitDefault | back to summary |
|---|---|
| public void visitDefault(GroovySourceAST t, int visit) Overrides org. Implements org. | |
| visitJavaArrayInit | back to summary |
|---|---|
| private void visitJavaArrayInit(GroovySourceAST t) Handle Arrays. Examples:
String[] myArray = new String[] {"a","b","c"};
becomes
String[] myArray = ["a", "b", "c"]
---
To convert node (t) and surrounding nodes into the right structure for List Constructor
(a) java/EXPR
|
+- (b) java/new
|
+ (t) java/ARRAY_INIT
becomes
(a) groovy/LIST_CONSTRUCTOR (via ARRAY_INIT as temporary marker type)
|
+- (t) groovy/ELIST
* note: node (b) is thrown away...
| |
| visitJavaLiteralDo | back to summary |
|---|---|
| private void visitJavaLiteralDo(GroovySourceAST t) | |