GenericErrorNode
Functions
Inserts the newNodes after this node if it is in a MutableList. For this to work, Node.assignParents must have been called.
Looks for targetNode in the lists of nodes in this node. When found, newNodes are inserted after it. When not found, an IllegalStateException is thrown.
Inserts the newNodes before this node if it is in a MutableList. For this to work, Node.assignParents must have been called.
Looks for targetNode in the lists of nodes in this node. When found, newNodes are inserted before it. When not found, an IllegalStateException is thrown.
Sets or corrects the parent of all AST nodes. Kolasu does not see set/add/delete operations on the AST nodes, so this function should be called manually after modifying the AST.
Return the property containing this Node, if any. Null should be returned for root nodes.
Note that type T is not strictly forced to be a Node. This is intended to support interfaces like Statement
or Expression
. However, being an ancestor the returned value is guaranteed to be a Node, as only Node instances can be part of the hierarchy.
Return the index of this Node within the containing property. The return value is null for root nodes. The index is always 0 for Nodes in singular containment properties.
Executes an operation on the properties of a node.
Removes this node from the parent if it is in a MutableList. For this to work, Node.assignParents must have been called.
Looks for targetNode in the lists of nodes in this node. When found, it is removed. When not found, an IllegalStateException is thrown.
Replace this node with other (by modifying the children of the parent node.) For this to work, Node.assignParents must have been called.
Replaces this node with any amount of other nodes if it is in a MutableList.
Looks for oldNode in the lists of nodes in this node. When found, it is removed, and in its place the newNodes are inserted. When not found, an IllegalStateException is thrown.
Performs a post-order (or leaves-first) node traversal starting with a given node.
Properties
The properties of this AST nodes, including attributes, children, and references.
The source text for this node