@Value.Immutable public abstract class ASTNode extends Object
The tree is evaluated from bottom (leafs) to top, in a recursive way, until the root node is evaluated, which then holds the result of the complete expression.
To be able to visualize the tree, a toJSON method is provided. The produced JSON
string can be used to visualize the tree. OE.g. with this online tool:
| Constructor and Description |
|---|
ASTNode() |
| Modifier and Type | Method and Description |
|---|---|
abstract List<ASTNode> |
getParameters() |
abstract Token |
getToken() |
static ASTNode |
of(Token token,
ASTNode... parameters) |
String |
toJSON()
Produces a JSON string representation of this node ad all its children.
|
Copyright © 2024. All rights reserved.