antlr.Parser , Token, org.codehaus.groovy.syntax.Reduction , org.codehaus.groovy.syntax.Types
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public CSTNode | |
| public void | |
| public abstract Reduction | |
| public boolean | |
| public int | |
| public abstract CSTNode | |
| public CSTNode | get(int index, boolean safe)
Returns the specified element, or Token.NULL if safe is set and the specified element is null (or doesn't exist). |
| public String | |
| public int | |
| public int | |
| public abstract Token | |
| public Token | |
| public String | |
| public int | |
| public int | |
| public int | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public void | |
| pack-priv boolean | |
| pack-priv boolean | matches(int type, int child1)
Returns true if the node and its first child match the specified types. |
| pack-priv boolean | matches(int type, int child1, int child2)
Returns true if the node and its first and second child match the specified types. |
| pack-priv boolean | matches(int type, int child1, int child2, int child3)
Returns true if the node and its first three children match the specified types. |
| pack-priv boolean | matches(int type, int child1, int child2, int child3, int child4)
Returns true if the node an its first four children match the specified types. |
| public CSTNode | |
| public CSTNode | |
| public abstract int | |
| public String | |
| public void | |
| protected void |
| CSTNode | back to summary |
|---|---|
| public CSTNode() | |
| add | back to summary |
|---|---|
| public CSTNode add(CSTNode element) Adds an element to the node. Returns the element for convenience. Not all nodes support this operation! | |
| addChildrenOf | back to summary |
|---|---|
| public void addChildrenOf(CSTNode of) Adds all children of the specified node to this one. Not all nodes support this operation! | |
| asReduction | back to summary |
|---|---|
| public abstract Reduction asReduction() Creates a | |
| canMean | back to summary |
|---|---|
| public boolean canMean(int type) Returns true if the node can be coerced to the specified type. | |
| children | back to summary |
|---|---|
| public int children() Returns the number of non-root elements in the node. | |
| get | back to summary |
|---|---|
| public abstract CSTNode get(int index) Returns the specified element, or null. | |
| get | back to summary |
|---|---|
| public CSTNode get(int index, boolean safe) Returns the specified element, or Token.NULL if safe is set and the specified element is null (or doesn't exist). | |
| getDescription | back to summary |
|---|---|
| public String getDescription() Returns a description of the node. | |
| getMeaning | back to summary |
|---|---|
| public int getMeaning() Returns the meaning of this node. If the node isEmpty(), returns the type of Token.NULL. | |
| getMeaningAs | back to summary |
|---|---|
| public int getMeaningAs(int[] types) Returns the first matching meaning of the specified types. Returns Types.UNKNOWN if there are no matches. | |
| getRoot | back to summary |
|---|---|
| public abstract Token getRoot() Returns the root of the node. By convention, all nodes have
a Token as the first element (or root), which indicates the type
of the node. May return null if the node | |
| getRoot | back to summary |
|---|---|
| public Token getRoot(boolean safe) Returns the root of the node, the Token that indicates its type. Returns a Token.NULL if safe and the actual root is null. | |
| getRootText | back to summary |
|---|---|
| public String getRootText() Returns the text of the root. Uses | |
| getStartColumn | back to summary |
|---|---|
| public int getStartColumn() Returns the starting column of the node. Returns -1 if not known. | |
| getStartLine | back to summary |
|---|---|
| public int getStartLine() Returns the starting line of the node. Returns -1 if not known. | |
| getType | back to summary |
|---|---|
| public int getType() Returns the actual type of the node. If the node isEmpty(), returns the type of Token.NULL. | |
| hasChildren | back to summary |
|---|---|
| public boolean hasChildren() Returns true if the node has any non-root elements. | |
| isA | back to summary |
|---|---|
| public boolean isA(int type) Returns true if the node's meaning matches the specified type. | |
| isAllOf | back to summary |
|---|---|
| public boolean isAllOf(int[] types) Returns true if the node's meaning matches all of the specified types. | |
| isAnExpression | back to summary |
|---|---|
| public boolean isAnExpression() Returns true if the node is a complete expression. | |
| isEmpty | back to summary |
|---|---|
| public boolean isEmpty() Returns true if the node is completely empty (no root, even). | |
| isOneOf | back to summary |
|---|---|
| public boolean isOneOf(int[] types) Returns true if the node's meaning matches any of the specified types. | |
| markAsExpression | back to summary |
|---|---|
| public void markAsExpression() Marks the node a complete expression. Not all nodes support this operation! | |
| matches | back to summary |
|---|---|
| pack-priv boolean matches(int type) Returns true if the node matches the specified type. Effectively
a synonym for | |
| matches | back to summary |
|---|---|
| pack-priv boolean matches(int type, int child1) Returns true if the node and its first child match the specified types. Missing nodes are Token.NULL. | |
| matches | back to summary |
|---|---|
| pack-priv boolean matches(int type, int child1, int child2) Returns true if the node and its first and second child match the specified types. Missing nodes are Token.NULL. | |
| matches | back to summary |
|---|---|
| pack-priv boolean matches(int type, int child1, int child2, int child3) Returns true if the node and its first three children match the specified types. Missing nodes are Token.NULL. | |
| matches | back to summary |
|---|---|
| pack-priv boolean matches(int type, int child1, int child2, int child3, int child4) Returns true if the node an its first four children match the specified types. Missing nodes have type Types.NULL. | |
| set | back to summary |
|---|---|
| public CSTNode set(int index, CSTNode element) Sets an element node in at the specified index. Returns the element for convenience. Not all nodes support this operation! | |
| setMeaning | back to summary |
|---|---|
| public CSTNode setMeaning(int meaning) Sets the meaning for this node (and its root Token). Not valid if the node isEmpty(). Returns the node, for convenience. | |
| size | back to summary |
|---|---|
| public abstract int size() Returns the number of elements in the node (including root). | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Formats the node as a
| |
| write | back to summary |
|---|---|
| public void write(PrintWriter writer) Formats the node and writes it to the specified | |
| write | back to summary |
|---|---|
| protected void write(PrintWriter writer, String indent) Formats the node and writes it to the specified | |