mirror of
https://github.com/github/codeql.git
synced 2026-03-30 20:28:15 +02:00
JS: Emit variable bindings for 'this' expressions
This commit is contained in:
@@ -1896,6 +1896,15 @@ public class ASTExtractor {
|
||||
return visit((ThisExpression) nd, c);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Label visit(ThisExpression nd, Context c) {
|
||||
Label key = super.visit(nd, c);
|
||||
if (c.idcontext == IdContext.VAR_BIND || c.idcontext == IdContext.VAR_IN_TYPE_BIND) {
|
||||
addVariableBinding("bind", key, "this");
|
||||
}
|
||||
return key;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Label visit(JSXMemberExpression nd, Context c) {
|
||||
Label key = super.visit(nd, c);
|
||||
|
||||
Reference in New Issue
Block a user