addChild
public void addChild(AST c)
Add a (rightmost) child to this node
- addChild in interface AST
getColumn
public int getColumn()
- getColumn in interface AST
- 2.7.3 Need for error handling
getFirstChild
public AST getFirstChild()
Get the first child of this node; null if no children
- getFirstChild in interface AST
getLine
public int getLine()
- getLine in interface AST
- 2.7.3 Need for error handling
getNextSibling
public AST getNextSibling()
Get the next sibling in line after this one
- getNextSibling in interface AST
getNumberOfChildren
public int getNumberOfChildren()
Get number of children of this node; if leaf, returns 0
- getNumberOfChildren in interface AST
getText
public String getText()
Get the token text for this node
- getText in interface AST
getType
public int getType()
Get the token type for this node
- getType in interface AST
initialize
public void initialize(int t,
String txt)
- initialize in interface AST
setFirstChild
public void setFirstChild(AST c)
Set the first child of a node.
- setFirstChild in interface AST
setNextSibling
public void setNextSibling(AST n)
Set the next sibling after this one.
- setNextSibling in interface AST
setText
public void setText(String text)
Set the token text for this node
- setText in interface AST
setType
public void setType(int ttype)
Set the token type for this node
- setType in interface AST
toString
public String toString()
- toString in interface AST