public interface DetailAST
Modifier and Type | Method and Description |
---|---|
boolean |
branchContains(int type)
Checks if this branch of the parse tree contains a token
of the provided type.
|
DetailAST |
findFirstToken(int type)
Returns the first child token that makes a specified type.
|
int |
getChildCount()
Returns the number of child nodes one level below this node.
|
int |
getChildCount(int type)
Returns the number of direct child tokens that have the specified type.
|
int |
getColumnNo()
Gets column number.
|
DetailAST |
getFirstChild()
Get the first child of this AST.
|
DetailAST |
getLastChild()
Gets the last child node.
|
int |
getLineNo()
Gets line number.
|
DetailAST |
getNextSibling()
Get the next sibling in line after this one.
|
int |
getNumberOfChildren()
Deprecated.
This method will be removed in a future release.
Use
getChildCount() instead. |
DetailAST |
getParent()
Returns the parent token.
|
DetailAST |
getPreviousSibling()
Returns the previous sibling or null if no such sibling exists.
|
String |
getText()
Gets the text of this AST.
|
int |
getType()
Gets the type of this AST.
|
boolean |
hasChildren()
Returns whether this AST has any children.
|
int getChildCount()
int getChildCount(int type)
type
- the token type to matchint getType()
int getLineNo()
int getColumnNo()
DetailAST getLastChild()
boolean branchContains(int type)
type
- a TokenTypetype
.DetailAST getPreviousSibling()
DetailAST findFirstToken(int type)
type
- the token type to matchDetailAST getNextSibling()
DetailAST getFirstChild()
@Deprecated int getNumberOfChildren()
getChildCount()
instead.boolean hasChildren()
true
if this AST has any children.Copyright © 2001–2020. All rights reserved.