| java.lang.Object org.codehaus.groovy.syntax.CSTNode org.codehaus.groovy.syntax.Reduction
Constructor Summary | |
public | Reduction(Token root) Initializes the Reduction with the specified root. |
Method Summary | |
public CSTNode | add(CSTNode element) Adds an element to the node. | public Reduction | asReduction() Creates a Reduction from this node. | public CSTNode | get(int index) Returns the specified element, or null. | public Token | getRoot() Returns the root of the node, the Token that indicates it's
type. | public boolean | isAnExpression() Returns true if the node is a complete expression. | public boolean | isEmpty() Returns true if the node is completely empty (no root, even). | public void | markAsExpression() Marks the node a complete expression. | public static Reduction | newContainer() Creates a new Reduction with Token.NULL
as it's root. | public CSTNode | remove(int index) Removes a node from the Reduction . | public CSTNode | set(int index, CSTNode element) Sets an element in at the specified index. | public int | size() Returns the number of elements in the node. |
Reduction | public Reduction(Token root)(Code) | | Initializes the Reduction with the specified root.
|
asReduction | public Reduction asReduction()(Code) | | Creates a Reduction from this node. Returns self if the
node is already a Reduction .
|
get | public CSTNode get(int index)(Code) | | Returns the specified element, or null.
|
getRoot | public Token getRoot()(Code) | | Returns the root of the node, the Token that indicates it's
type. Returns null if there is no root (usually only if the
node is a placeholder of some kind -- see isEmpty()).
|
isAnExpression | public boolean isAnExpression()(Code) | | Returns true if the node is a complete expression.
|
isEmpty | public boolean isEmpty()(Code) | | Returns true if the node is completely empty (no root, even).
|
markAsExpression | public void markAsExpression()(Code) | | Marks the node a complete expression.
|
newContainer | public static Reduction newContainer()(Code) | | Creates a new Reduction with Token.NULL
as it's root.
|
remove | public CSTNode remove(int index)(Code) | | Removes a node from the Reduction . You cannot remove
the root node (index 0).
|
size | public int size()(Code) | | Returns the number of elements in the node.
|
Methods inherited from org.codehaus.groovy.syntax.CSTNode | public CSTNode add(CSTNode element)(Code)(Java Doc) public void addChildrenOf(CSTNode of)(Code)(Java Doc) abstract public Reduction asReduction()(Code)(Java Doc) public boolean canMean(int type)(Code)(Java Doc) public int children()(Code)(Java Doc) abstract public CSTNode get(int index)(Code)(Java Doc) public CSTNode get(int index, boolean safe)(Code)(Java Doc) public String getDescription()(Code)(Java Doc) public int getMeaning()(Code)(Java Doc) public int getMeaningAs(int[] types)(Code)(Java Doc) abstract public Token getRoot()(Code)(Java Doc) public Token getRoot(boolean safe)(Code)(Java Doc) public String getRootText()(Code)(Java Doc) public int getStartColumn()(Code)(Java Doc) public int getStartLine()(Code)(Java Doc) public int getType()(Code)(Java Doc) public boolean hasChildren()(Code)(Java Doc) public boolean isA(int type)(Code)(Java Doc) public boolean isAllOf(int[] types)(Code)(Java Doc) public boolean isAnExpression()(Code)(Java Doc) public boolean isEmpty()(Code)(Java Doc) public boolean isOneOf(int[] types)(Code)(Java Doc) public void markAsExpression()(Code)(Java Doc) boolean matches(int type)(Code)(Java Doc) boolean matches(int type, int child1)(Code)(Java Doc) boolean matches(int type, int child1, int child2)(Code)(Java Doc) boolean matches(int type, int child1, int child2, int child3)(Code)(Java Doc) boolean matches(int type, int child1, int child2, int child3, int child4)(Code)(Java Doc) public CSTNode set(int index, CSTNode element)(Code)(Java Doc) public CSTNode setMeaning(int meaning)(Code)(Java Doc) abstract public int size()(Code)(Java Doc) public String toString()(Code)(Java Doc) public void write(PrintWriter writer)(Code)(Java Doc) protected void write(PrintWriter writer, String indent)(Code)(Java Doc)
|
|
|