new Variable()
A Variable represents a locally scoped identifier. These include arguments to
functions.
Members
-
defs :DefEntry[]
-
List of defining occurrences of this variable (like in 'var ...' statements or as parameter), as custom objects.
Type:
- DefEntry[]
- Source:
Properties:
Name Type Argument Description DefEntry.typeString the type of the occurrence (e.g. "Parameter", "Variable", ...) DefEntry.nameesprima.Identifier the identifier AST node of the occurrence DefEntry.nodeesprima.Node the enclosing node of the identifier DefEntry.parentesprima.Node <optional>
the enclosing statement node of the identifier -
identifiers :esprima.Identifier[]
-
List of defining occurrences of this variable (like in 'var ...' statements or as parameter), as AST nodes.
Type:
- esprima.Identifier[]
-
name :String
-
The variable name, as given in the source code.
Type:
- String
-
references :Reference[]
-
List of references of this variable (excluding parameter entries) in its defining scope and all nested scopes. For defining occurrences only see Variable#defs.
Type:
- Reference[]
-
scope :Scope
-
Reference to the enclosing Scope.
Type:
-
stack :boolean
-
Whether this is a stack variable.
Type:
- boolean