|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.waxeye.ast.AST<E>
E - The node types for the AST.public final class AST<E extends java.lang.Enum<?>>
A class to represent an abstract syntax tree.
| Constructor Summary | |
|---|---|
AST(E type,
java.util.List<IAST<E>> children,
Position position)
Creates a new AST. |
|
| Method Summary | |
|---|---|
void |
acceptASTVisitor(IASTVisitor visitor)
Accepts the visitor. |
java.lang.String |
childrenAsString()
Treats the children of the AST as IChar's and concatenates their values into a String. |
boolean |
equals(java.lang.Object object)
|
java.util.List<IAST<E>> |
getChildren()
Returns the children. |
Position |
getPosition()
Returns the position. |
E |
getType()
Returns the type. |
int |
hashCode()
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AST(E type,
java.util.List<IAST<E>> children,
Position position)
type - The type of the AST.children - The children of the AST.position - The position of the AST.| Method Detail |
|---|
public boolean equals(java.lang.Object object)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.util.List<IAST<E>> getChildren()
getChildren in interface IAST<E extends java.lang.Enum<?>>public Position getPosition()
null if the AST doesn't have a position set.
getPosition in interface IAST<E extends java.lang.Enum<?>>public E getType()
getType in interface IAST<E extends java.lang.Enum<?>>public void acceptASTVisitor(IASTVisitor visitor)
acceptASTVisitor in interface IAST<E extends java.lang.Enum<?>>visitor - The visitor to accept.public final java.lang.String childrenAsString()
childrenAsString in interface IAST<E extends java.lang.Enum<?>>public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||