Class: Variable

Variable

new Variable()

A Variable represents a locally scoped identifier. These include arguments to functions.
Source:

Members

defs :DefEntry[]

List of defining occurrences of this variable (like in 'var ...' statements or as parameter), as custom objects.
Type:
  • DefEntry[]
Properties:
Name Type Argument Description
DefEntry.type String the type of the occurrence (e.g. "Parameter", "Variable", ...)
DefEntry.name esprima.Identifier the identifier AST node of the occurrence
DefEntry.node esprima.Node the enclosing node of the identifier
DefEntry.parent esprima.Node <optional>
the enclosing statement node of the identifier
Source:

identifiers :esprima.Identifier[]

List of defining occurrences of this variable (like in 'var ...' statements or as parameter), as AST nodes.
Type:
  • esprima.Identifier[]
Source:

name :String

The variable name, as given in the source code.
Type:
  • String
Source:

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[]
Source:

scope :Scope

Reference to the enclosing Scope.
Type:
Source:

stack :boolean

Whether this is a stack variable.
Type:
  • boolean
Source: