new Reference()
A Reference represents a single occurrence of an identifier in code.
Members
-
from :Scope
-
Reference to the enclosing Scope.
Type:
-
identifier :esprima#Identifier
-
Identifier syntax node.
Type:
- esprima#Identifier
-
partial :boolean
-
Whether the Reference might refer to a partial value of writeExpr.
Type:
- boolean
-
resolved :Variable
-
The variable this reference is resolved with.
Type:
-
tainted :boolean
-
Whether the reference comes from a dynamic scope (such as 'eval', 'with', etc.), and may be trapped by dynamic scopes.
Type:
- boolean
-
writeExpr :esprima#Node
-
If reference is writeable, this is the tree being written to it.
Type:
- esprima#Node
Methods
-
isRead() → {boolean}
-
Whether the reference is readable.
Returns:
- Type
- boolean
-
isReadOnly() → {boolean}
-
Whether the reference is read-only.
Returns:
- Type
- boolean
-
isReadWrite() → {boolean}
-
Whether the reference is read-write.
Returns:
- Type
- boolean
-
isStatic() → {boolean}
-
Whether the reference is static.
Returns:
- Type
- boolean
-
isWrite() → {boolean}
-
Whether the reference is writeable.
Returns:
- Type
- boolean
-
isWriteOnly() → {boolean}
-
Whether the reference is write-only.
Returns:
- Type
- boolean