зеркало из https://github.com/github/codeql.git
JavaScript: Introduce `Parameter.getVariable()`.
This commit is contained in:
Родитель
2cb33f6088
Коммит
fb744a6c53
|
@ -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() }
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче