
Public Member Functions | |
| void | FreshenParentAndChildIndexes () |
| Set (or reset) the parent and child index values for all children. | |
| ITree | GetChild (int i) |
| void | AddChild (ITree t) |
| 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. | |
| void | SetChild (int i, ITree t) |
| Set ith child (0..n-1) to t; t must be non-null and non-nil node. | |
| object | DeleteChild (int i) |
| void | ReplaceChildren (int startChildIndex, int stopChildIndex, object t) |
| 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. | |
| ITree | DupNode () |
| string | ToStringTree () |
| string | ToString () |
Properties | |
| int | ChildCount [get] |
| ITree | Parent [get, set] |
| int | ChildIndex [get, set] |
| This node is what child index? 0..n-1. | |
| bool | IsNil [get] |
| Indicates the node is a nil node but may still have children, meaning the tree is a flat list. | |
| int | Type [get] |
| Return a token type; needed for tree parsing. | |
| string | Text [get] |
| int | Line [get] |
| In case we don't have a token payload, what is the line for errors? | |
| int | CharPositionInLine [get] |
| int | TokenStartIndex [get, set] |
| What is the smallest token index (indexing from 0) for this node and its children? | |
| int | TokenStopIndex [get, set] |
| What is the largest token index (indexing from 0) for this node and its children? | |
NOTE: When constructing trees, ANTLR can build any kind of tree; it can even use Token objects as trees if you add a child list to your tokens.
This is a tree node without any payload; just navigation and factory stuff.
Definition at line 51 of file ITree.cs.
| void Antlr.Runtime.Tree.ITree.FreshenParentAndChildIndexes | ( | ) |
Set (or reset) the parent and child index values for all children.
Implemented in Antlr.Runtime.Tree.BaseTree.
| ITree Antlr.Runtime.Tree.ITree.GetChild | ( | int | i | ) |
Implemented in Antlr.Runtime.Tree.BaseTree.
| void Antlr.Runtime.Tree.ITree.AddChild | ( | ITree | t | ) |
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.
| t | Tree to add |
Implemented in Antlr.Runtime.Tree.BaseTree.
| void Antlr.Runtime.Tree.ITree.SetChild | ( | int | i, | |
| ITree | t | |||
| ) |
Set ith child (0..n-1) to t; t must be non-null and non-nil node.
Implemented in Antlr.Runtime.Tree.BaseTree.
| object Antlr.Runtime.Tree.ITree.DeleteChild | ( | int | i | ) |
Implemented in Antlr.Runtime.Tree.BaseTree.
| void Antlr.Runtime.Tree.ITree.ReplaceChildren | ( | int | startChildIndex, | |
| int | stopChildIndex, | |||
| object | t | |||
| ) |
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.
Implemented in Antlr.Runtime.Tree.BaseTree.
| ITree Antlr.Runtime.Tree.ITree.DupNode | ( | ) |
| string Antlr.Runtime.Tree.ITree.ToStringTree | ( | ) |
Implemented in Antlr.Runtime.Tree.BaseTree.
| string Antlr.Runtime.Tree.ITree.ToString | ( | ) |
int Antlr.Runtime.Tree.ITree.ChildCount [get] |
ITree Antlr.Runtime.Tree.ITree.Parent [get, set] |
Implemented in Antlr.Runtime.Tree.BaseTree, and Antlr.Runtime.Tree.CommonTree.
int Antlr.Runtime.Tree.ITree.ChildIndex [get, set] |
This node is what child index? 0..n-1.
Implemented in Antlr.Runtime.Tree.BaseTree, and Antlr.Runtime.Tree.CommonTree.
bool Antlr.Runtime.Tree.ITree.IsNil [get] |
Indicates the node is a nil node but may still have children, meaning the tree is a flat list.
Implemented in Antlr.Runtime.Tree.BaseTree, Antlr.Runtime.CommonErrorNode, and Antlr.Runtime.Tree.CommonTree.
int Antlr.Runtime.Tree.ITree.Type [get] |
Return a token type; needed for tree parsing.
Implemented in Antlr.Runtime.Debug.RemoteDebugEventSocketListener.ProxyTree, Antlr.Runtime.Tree.BaseTree, Antlr.Runtime.CommonErrorNode, Antlr.Runtime.Tree.CommonTree, and Antlr.Runtime.Tree.ParseTree.
string Antlr.Runtime.Tree.ITree.Text [get] |
int Antlr.Runtime.Tree.ITree.Line [get] |
In case we don't have a token payload, what is the line for errors?
Implemented in Antlr.Runtime.Tree.BaseTree, and Antlr.Runtime.Tree.CommonTree.
int Antlr.Runtime.Tree.ITree.CharPositionInLine [get] |
Implemented in Antlr.Runtime.Tree.BaseTree, and Antlr.Runtime.Tree.CommonTree.
int Antlr.Runtime.Tree.ITree.TokenStartIndex [get, set] |
What is the smallest token index (indexing from 0) for this node and its children?
Implemented in Antlr.Runtime.Debug.RemoteDebugEventSocketListener.ProxyTree, Antlr.Runtime.Tree.BaseTree, Antlr.Runtime.Tree.CommonTree, and Antlr.Runtime.Tree.ParseTree.
int Antlr.Runtime.Tree.ITree.TokenStopIndex [get, set] |
What is the largest token index (indexing from 0) for this node and its children?
Implemented in Antlr.Runtime.Debug.RemoteDebugEventSocketListener.ProxyTree, Antlr.Runtime.Tree.BaseTree, Antlr.Runtime.Tree.CommonTree, and Antlr.Runtime.Tree.ParseTree.
1.5.5