|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectxtc.tree.Visitor
xtc.tree.Relocator
public class Relocator
Visitor to relocate an abstract syntax tree. This visitor strips all line markers from the abstract syntax tree, while also updating all nodes with locations to reflect the source location relative to the last line marker.
| Field Summary | |
|---|---|
protected int |
baseLine
The line of the last line marker. |
protected java.lang.String |
markedFile
The currently marked file. |
protected int |
markedLine
The currently marked line. |
| Constructor Summary | |
|---|---|
Relocator()
Create a new relocator. |
|
| Method Summary | |
|---|---|
protected void |
relocate(Node n)
Relocate the specified node. |
Annotation |
visit(Annotation a)
Process the specified annotation. |
Node |
visit(LineMarker m)
Process the specified line marker. |
Node |
visit(Node n)
Process the specified node. |
| Methods inherited from class xtc.tree.Visitor |
|---|
dispatch, equals, hashCode, iterate, map, mapInPlace, unableToVisit |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.String markedFile
protected int markedLine
protected int baseLine
| Constructor Detail |
|---|
public Relocator()
| Method Detail |
|---|
protected void relocate(Node n)
n - The node.public Node visit(Node n)
public Annotation visit(Annotation a)
visit in class Visitora - The annotation.
public Node visit(LineMarker m)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||