Node class abstract
A node in the abstract syntax tree of a JavaScript program.
- Implementers
Constructors
- Node()
Properties
- enclosingFunction → FunctionNode?
-
Returns the FunctionNode enclosing this node, possibly the node itself, or null if not enclosed in any function.
no setter
- enclosingProgram → Program?
-
Returns the Program node enclosing this node, possibly the node itself, or null if not enclosed in any program.
no setter
- end ↔ int?
-
Source-code offset.
getter/setter pair
- filename → String?
-
Retrieves the filename from the enclosing Program. Returns null if the node is orphaned.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- line ↔ int?
-
1-based line number.
getter/setter pair
- location → String
-
A string with filename and line number.
no setter
- parent ↔ Node?
-
The parent of this node, or null if this is the Program node.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- start ↔ int?
-
Source-code offset.
getter/setter pair
Methods
-
forEach(
void callback(Node node)) → void - Visits the immediate children of this node.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
visitBy<
T> (Visitor< T> visitor) → T -
Calls the relevant
visit
method on the visitor. -
visitBy1<
T, A> (Visitor1< T, A> visitor, A arg) → T -
Calls the relevant
visit
method on the visitor.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited