Return this Node with a Type assigned (if no other type has been seen for it yet) or a typed copy.
Return this Node with a Type assigned (if no other type has been seen for it yet) or a typed copy.
Build a copy of this node with the current children.
Build a copy of this node with the current children.
Names for the child nodes to show in AST dumps.
Names for the child nodes to show in AST dumps. Defaults to a numbered sequence starting at 0 but can be overridden by subclasses to produce more suitable names.
All child nodes of this node.
All child nodes of this node. Must be implemented by subclasses.
Apply a side-effecting function to all direct children from left to right.
Apply a side-effecting function to all direct children from left to right. Note that
n.childrenForeach(f)
is equivalent to
n.children.foreach(f)
but can be
implemented more efficiently in Node
subclasses.
n.children.foreach(f)
}}}
implemented more efficiently in Node
subclasses.
n.childrenForeach(f)
}}}
implemented more efficiently in Node
subclasses.
Return the name, main info, attribute info and named children
Check if this node has a type without marking the type as seen.
Check if this node has a type without marking the type as seen.
Rebuild this node and all children with their computed type.
Rebuild this node and all children with their computed type. If this node already has a type,
the children are only type-checked again if
is true. if typeChildren
is also
true, the existing type of this node is replaced. If this node does not yet have a type, the
types of all children are computed first.retype
Apply a mapping function to all children of this node and recreate the node with the new children.
Apply a mapping function to all children of this node and recreate the node with the new
children. If all new children are identical to the old ones, this node is returned. If
is true, the type of this node is kept even when the children have changed.keepType
The current type of this node.
The current type of this node.
Get the current type of this node for debug output without marking it as seen.
Get the current type of this node for debug output without marking it as seen.
Rebuild this node with a new list of children.
Rebuild this node with a new list of children. Implementations of this method must not reuse the current node. This method always returns a fresh copy.
Return this Node with no Type assigned (if it has not yet been observed) or an untyped copy.
Return this Node with no Type assigned (if it has not yet been observed) or an untyped copy.
Rebuild this node with new child nodes unless all children are identical to the current ones, in which case this node is returned.
Rebuild this node with new child nodes unless all children are identical to the current ones, in which case this node is returned.
Rebuild an Option type on the client side