GeneratorExpressionLoop
One for clause inside a generator expression. Unlike ArrayComprehensionLoop it does not support the for each form.
Properties
The absolute document position, computed by adding this node's relative position to the relative positions of all its parents.
The scopes whose parent is this scope, or null if there are none.
Position of the each keyword in a for each..in loop, relative to this node.
The innermost enclosing function, or null. The search begins with the parent.
Comments on the same line as the statement, for example the trailing comment in if (x == 2) // note.
Position of the in or of keyword, relative to this node.
The object being iterated. Setting it reparents the node.
A copy of the child list, with each child cast to an AstNode. Throws once the code generator has begun the tree transformation and non-AstNode children appear.
Insertion-ordered so that iteration follows declaration order.
The current script or function scope.
The node type, e.g. Token.NAME.
Functions
Adds a scope to the child list and sets the child's parent scope to this scope.
Used only for code generation.
A debugging representation of the parse tree starting at this node. Each line reads abs-pos name position length [identifier].
The scope in which name is defined: this scope, one of its parents, or null when the name is not defined anywhere in this scope chain.
Checks that every return usage in a function body is consistent with strict mode. See the END_* flags for what the analysis reports.
Constructs an indentation string of indent steps.
Used by the parser. Repoints this scope's child scopes at newScope and copies this scope's symbols into it.
Recursively unlabel every TARGET or YIELD node in the tree. Used only for inlining finally blocks where jsr instructions used to be.
Makes this node's position relative to a parent. The current position is assumed to be absolute and is decremented by parentPosition.
Jumps are only used during code generation and do not support the visitor interface.