Package | org.antlr.runtime.tree |
Interface | public interface Tree |
Implementors | BaseTree, BaseTreeAdaptor, CommonTreeNodeStream |
Property | Defined by | ||
---|---|---|---|
charPositionInLine : int [read-only]
| Tree | ||
childCount : int [read-only]
| Tree | ||
childIndex : int This node is what child index? 0..n-1
| Tree | ||
isNil : Boolean [read-only] Indicates the node is a nil node but may still have children, meaning
the tree is a flat list.
| Tree | ||
line : int [read-only] In case we don't have a token payload, what is the line for errors?
| Tree | ||
parent : Tree | Tree | ||
text : String [read-only]
| Tree | ||
tokenStartIndex : int What is the smallest token index (indexing from 0) for this node
and its children?
| Tree | ||
tokenStopIndex : int What is the largest token index (indexing from 0) for this node
and its children?
| Tree | ||
type : int [read-only] Return a token type; needed for tree parsing
| Tree |
Method | Defined by | ||
---|---|---|---|
Add t as a child to this node.
| Tree | ||
deleteChild(i:int):Object
| Tree | ||
Tree | |||
freshenParentAndChildIndexes():void
Set the parent and child index values for all children
| Tree | ||
Tree | |||
replaceChildren(startChildIndex:int, stopChildIndex:int, t:Object):void
Delete children from start to stop and replace with t even if t is
a list (nil-root tree).
| Tree | ||
Set ith child (0..n-1) to t; t must be non-null and non-nil node
| Tree | ||
toStringTree():String
| Tree |
charPositionInLine | property |
charPositionInLine:int
[read-only]Implementation
public function get charPositionInLine():int
childCount | property |
childCount:int
[read-only]Implementation
public function get childCount():int
childIndex | property |
childIndex:int
[read-write]This node is what child index? 0..n-1
Implementation public function get childIndex():int
public function set childIndex(value:int):void
isNil | property |
isNil:Boolean
[read-only]Indicates the node is a nil node but may still have children, meaning the tree is a flat list.
Implementation public function get isNil():Boolean
line | property |
line:int
[read-only]In case we don't have a token payload, what is the line for errors?
Implementation public function get line():int
parent | property |
parent:Tree
[read-write]Implementation
public function get parent():Tree
public function set parent(value:Tree):void
text | property |
text:String
[read-only]Implementation
public function get text():String
tokenStartIndex | property |
tokenStartIndex:int
[read-write]What is the smallest token index (indexing from 0) for this node and its children?
Implementation public function get tokenStartIndex():int
public function set tokenStartIndex(value:int):void
tokenStopIndex | property |
tokenStopIndex:int
[read-write]What is the largest token index (indexing from 0) for this node and its children?
Implementation public function get tokenStopIndex():int
public function set tokenStopIndex(value:int):void
type | property |
type:int
[read-only]Return a token type; needed for tree parsing
Implementation public function get type():int
addChild | () | method |
public function addChild(t:Tree):void
Add t as a child to this node. If t is null, do nothing. If t is nil, add all children of t to this' children.
Parameterst:Tree |
deleteChild | () | method |
public function deleteChild(i:int):Object
Parameters
i:int |
Object |
dupNode | () | method |
freshenParentAndChildIndexes | () | method |
public function freshenParentAndChildIndexes():void
Set the parent and child index values for all children
getChild | () | method |
replaceChildren | () | method |
public function replaceChildren(startChildIndex:int, stopChildIndex:int, t:Object):void
Delete children from start to stop and replace with t even if t is a list (nil-root tree). num of children can increase or decrease. For huge child lists, inserting children can force walking rest of children to set their childindex; could be slow.
ParametersstartChildIndex:int |
|
stopChildIndex:int |
|
t:Object |
setChild | () | method |
public function setChild(i:int, t:Tree):void
Set ith child (0..n-1) to t; t must be non-null and non-nil node
Parametersi:int |
|
t:Tree |
toStringTree | () | method |
public function toStringTree():String
Returns
String |