public class CompositeNode extends AbstractNode implements ICompositeNode
Constructor and Description |
---|
CompositeNode() |
Modifier and Type | Method and Description |
---|---|
BidiIterable<AbstractNode> |
basicGetChildren() |
protected AbstractNode |
basicGetFirstChild() |
protected AbstractNode |
basicGetLastChild() |
protected void |
basicSetFirstChild(AbstractNode firstChild) |
protected void |
basicSetLookAhead(int lookAhead) |
BidiIterable<INode> |
getChildren()
Returns an iterable that provides access to the children of the composite node.
|
INode |
getFirstChild()
Returns the first child of this node.
|
org.eclipse.emf.ecore.EObject |
getGrammarElement()
Returns the grammar element that created this node.
|
INode |
getLastChild()
Returns the last child of this node.
|
int |
getLookAhead()
Return the number of tokens that the parser had to peek before it could decide to create this node.
|
int |
getTotalLength()
Returns the length of this node including hidden tokens.
|
int |
getTotalOffset()
Returns the offset of this node including hidden tokens.
|
boolean |
hasChildren()
Returns
true if this node has any children. |
protected boolean |
isFolded() |
protected boolean |
isFolded(java.lang.Object grammarElementOrArray) |
ICompositeNode |
resolveAsParent() |
basicGetGrammarElement, basicGetLineOfOffset, basicGetNextSibling, basicGetParent, basicGetPreviousSibling, basicGetSemanticElement, basicHasNextSibling, basicHasPreviousSibling, basicHasSiblings, basicIterator, basicSetGrammarElement, basicSetNextSibling, basicSetParent, basicSetPreviousSibling, getAsTreeIterable, getEndLine, getEndOffset, getLeafNodes, getLength, getNextSibling, getOffset, getParent, getPreviousSibling, getRootNode, getSemanticElement, getStartLine, getSyntaxErrorMessage, getText, getTextRegion, getTextRegionWithLineInformation, getTextRegionWithLineInformation, getTotalEndLine, getTotalEndOffset, getTotalStartLine, getTotalTextRegion, getTotalTextRegionWithLineInformation, hasDirectSemanticElement, hasNextSibling, hasPreviousSibling, hasSiblings, iterator, reverse
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAsTreeIterable, getEndLine, getEndOffset, getLeafNodes, getLength, getNextSibling, getOffset, getParent, getPreviousSibling, getRootNode, getSemanticElement, getStartLine, getSyntaxErrorMessage, getText, getTextRegion, getTextRegionWithLineInformation, getTotalEndLine, getTotalEndOffset, getTotalStartLine, getTotalTextRegion, getTotalTextRegionWithLineInformation, hasDirectSemanticElement, hasNextSibling, hasPreviousSibling, hasSiblings
public BidiIterable<INode> getChildren()
ICompositeNode
null
but may be empty.getChildren
in interface ICompositeNode
ICompositeNode.hasChildren()
,
ICompositeNode.getFirstChild()
,
ICompositeNode.getLastChild()
public BidiIterable<AbstractNode> basicGetChildren()
public boolean hasChildren()
ICompositeNode
true
if this node has any children.hasChildren
in interface ICompositeNode
true
if this node has any children.ICompositeNode.getChildren()
,
ICompositeNode.getFirstChild()
,
ICompositeNode.getLastChild()
public int getLookAhead()
ICompositeNode
ICompositeNode.getLookAhead()
.getLookAhead
in interface ICompositeNode
public int getTotalLength()
INode
getTotalLength
in interface INode
public int getTotalOffset()
INode
getTotalOffset
in interface INode
protected void basicSetLookAhead(int lookAhead)
public INode getFirstChild()
ICompositeNode
null
or may be the same as the last child
.getFirstChild
in interface ICompositeNode
ICompositeNode.hasChildren()
,
ICompositeNode.getChildren()
protected AbstractNode basicGetFirstChild()
protected void basicSetFirstChild(AbstractNode firstChild)
public INode getLastChild()
ICompositeNode
null
or may be the same as the first child
.getLastChild
in interface ICompositeNode
ICompositeNode.hasChildren()
,
ICompositeNode.getChildren()
protected AbstractNode basicGetLastChild()
protected boolean isFolded()
protected boolean isFolded(java.lang.Object grammarElementOrArray)
public ICompositeNode resolveAsParent()
public org.eclipse.emf.ecore.EObject getGrammarElement()
INode
null
in case of unrecoverable syntax
errors. This happens usually when a keyword occurred at an unexpected offset.getGrammarElement
in interface INode
getGrammarElement
in class AbstractNode
null
.