JavaScript: Introduce Parameter.getVariable().

This commit is contained in:
Max Schaefer
2019-05-20 16:01:12 +01:00
parent 2cb33f6088
commit fb744a6c53

View File

@@ -217,7 +217,7 @@ class ArgumentsVariable extends Variable {
/** An identifier that refers to a variable, either in a declaration or in a variable access. */
class VarRef extends @varref, Identifier, BindingPattern, LexicalRef {
/** Gets the variable this identifier refers to. */
Variable getVariable() { none() } // Overriden in VarAccess and VarDecl
override Variable getVariable() { none() } // Overriden in VarAccess and VarDecl
override string getName() { result = Identifier.super.getName() }
@@ -316,6 +316,9 @@ class BindingPattern extends @pattern, Expr {
/** Gets the name of this binding pattern if it is an identifier. */
string getName() { none() }
/** Gets the variable this binding pattern refers to if it is an identifier. */
Variable getVariable() { none() }
/** Gets a variable reference in binding position within this pattern. */
VarRef getABindingVarRef() { none() }