mirror of
https://github.com/github/codeql.git
synced 2026-05-03 12:45:27 +02:00
JavaScript: Introduce Parameter.getVariable().
This commit is contained in:
@@ -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() }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user