renamed "callexpr" to "call_expr"

This commit is contained in:
Erik Krogh Kristensen
2020-09-04 11:53:36 +02:00
parent 3e8f9a1549
commit f5e40ac727
7 changed files with 16 additions and 16 deletions

View File

@@ -999,7 +999,7 @@ class NewExpr extends @new_expr, InvokeExpr { }
* x.f() * x.f()
* ``` * ```
*/ */
class CallExpr extends @callexpr, InvokeExpr { class CallExpr extends @call_expr, InvokeExpr {
/** /**
* Gets the expression specifying the receiver on which the function * Gets the expression specifying the receiver on which the function
* is invoked, if any. * is invoked, if any.

View File

@@ -314,7 +314,7 @@ private class FileNamePath extends PathExpr, VarAccess {
* A path expression of the form `path.join(p, "...")` where * A path expression of the form `path.join(p, "...")` where
* `p` is also a path expression. * `p` is also a path expression.
*/ */
private class JoinedPath extends PathExpr, @callexpr { private class JoinedPath extends PathExpr, @call_expr {
JoinedPath() { JoinedPath() {
exists(MethodCallExpr call | call = this | exists(MethodCallExpr call | call = this |
call.getReceiver().(VarAccess).getName() = "path" and call.getReceiver().(VarAccess).getName() = "path" and

View File

@@ -273,7 +273,7 @@ private class GWTDependency extends ScriptDependency {
* A dependency on the Google Closure library indicated by * A dependency on the Google Closure library indicated by
* a call to `goog.require` or `goog.provide`. * a call to `goog.require` or `goog.provide`.
*/ */
private class GoogleClosureDep extends Dependency, @callexpr { private class GoogleClosureDep extends Dependency, @call_expr {
GoogleClosureDep() { GoogleClosureDep() {
exists(MethodCallExpr mce | exists(MethodCallExpr mce |
mce = this and mce.getReceiver().(GlobalVarAccess).getName() = "goog" mce = this and mce.getReceiver().(GlobalVarAccess).getName() = "goog"

View File

@@ -14,7 +14,7 @@ abstract class Test extends Locatable { }
/** /**
* A QUnit test, that is, an invocation of `QUnit.test`. * A QUnit test, that is, an invocation of `QUnit.test`.
*/ */
class QUnitTest extends Test, @callexpr { class QUnitTest extends Test, @call_expr {
QUnitTest() { QUnitTest() {
exists(MethodCallExpr mce | mce = this | exists(MethodCallExpr mce | mce = this |
mce.getReceiver().(VarAccess).getName() = "QUnit" and mce.getReceiver().(VarAccess).getName() = "QUnit" and
@@ -28,7 +28,7 @@ class QUnitTest extends Test, @callexpr {
* that is, an invocation of a function named `it` where the first argument * that is, an invocation of a function named `it` where the first argument
* is a string and the second argument is a function. * is a string and the second argument is a function.
*/ */
class BDDTest extends Test, @callexpr { class BDDTest extends Test, @call_expr {
BDDTest() { BDDTest() {
exists(CallExpr call | call = this | exists(CallExpr call | call = this |
call.getCallee().(VarAccess).getName() = "it" and call.getCallee().(VarAccess).getName() = "it" and
@@ -55,7 +55,7 @@ File getTestFile(File f, string stemExt) {
* named `<base>.test.<ext>` in the same directory as a file named * named `<base>.test.<ext>` in the same directory as a file named
* `<base>.<ext>`. * `<base>.<ext>`.
*/ */
class JestTest extends Test, @callexpr { class JestTest extends Test, @call_expr {
JestTest() { JestTest() {
exists(CallExpr call | call = this | exists(CallExpr call | call = this |
call.getCallee().(GlobalVarAccess).getName() = "test" and call.getCallee().(GlobalVarAccess).getName() = "test" and
@@ -75,21 +75,21 @@ class XUnitTest extends Test, XUnitFact { }
/** /**
* A tape test, that is, an invocation of `require('tape').test`. * A tape test, that is, an invocation of `require('tape').test`.
*/ */
class TapeTest extends Test, @callexpr { class TapeTest extends Test, @call_expr {
TapeTest() { this = DataFlow::moduleMember("tape", "test").getACall().asExpr() } TapeTest() { this = DataFlow::moduleMember("tape", "test").getACall().asExpr() }
} }
/** /**
* An AVA test, that is, an invocation of `require('ava').test`. * An AVA test, that is, an invocation of `require('ava').test`.
*/ */
class AvaTest extends Test, @callexpr { class AvaTest extends Test, @call_expr {
AvaTest() { this = DataFlow::moduleMember("ava", "test").getACall().asExpr() } AvaTest() { this = DataFlow::moduleMember("ava", "test").getACall().asExpr() }
} }
/** /**
* A Cucumber test, that is, an invocation of `require('cucumber')`. * A Cucumber test, that is, an invocation of `require('cucumber')`.
*/ */
class CucumberTest extends Test, @callexpr { class CucumberTest extends Test, @call_expr {
CucumberTest() { CucumberTest() {
exists(DataFlow::ModuleImportNode m, CallExpr call | exists(DataFlow::ModuleImportNode m, CallExpr call |
m.getPath() = "cucumber" and m.getPath() = "cucumber" and

View File

@@ -133,7 +133,7 @@ private class JQueryParseXmlCall extends XML::ParserInvocation {
/** /**
* A call to `$(...)` that constructs a wrapped DOM element, such as `$("<div/>")`. * A call to `$(...)` that constructs a wrapped DOM element, such as `$("<div/>")`.
*/ */
private class JQueryDomElementDefinition extends DOM::ElementDefinition, @callexpr { private class JQueryDomElementDefinition extends DOM::ElementDefinition, @call_expr {
string tagName; string tagName;
CallExpr call; CallExpr call;
@@ -194,7 +194,7 @@ private string attrOrProp() { result = "attr" or result = "prop" }
* An attribute definition using `elt.attr(name, value)` or `elt.prop(name, value)` * An attribute definition using `elt.attr(name, value)` or `elt.prop(name, value)`
* where `elt` is a wrapped set. * where `elt` is a wrapped set.
*/ */
private class JQueryAttr2Call extends JQueryAttributeDefinition, @callexpr { private class JQueryAttr2Call extends JQueryAttributeDefinition, @call_expr {
JQueryAttr2Call() { JQueryAttr2Call() {
exists(DataFlow::MethodCallNode call | this = call.asExpr() | exists(DataFlow::MethodCallNode call | this = call.asExpr() |
call = JQuery::objectRef().getAMethodCall(attrOrProp()) and call = JQuery::objectRef().getAMethodCall(attrOrProp()) and
@@ -258,7 +258,7 @@ private class JQueryBulkAttributeProp extends JQueryAttributeDefinition {
* An attribute definition using `jQuery.attr(elt, name, value)` or `jQuery.prop(elt, name, value)` * An attribute definition using `jQuery.attr(elt, name, value)` or `jQuery.prop(elt, name, value)`
* where `elt` is a wrapped set or a plain DOM element. * where `elt` is a wrapped set or a plain DOM element.
*/ */
private class JQueryAttr3Call extends JQueryAttributeDefinition, @callexpr { private class JQueryAttr3Call extends JQueryAttributeDefinition, @call_expr {
MethodCallExpr mce; MethodCallExpr mce;
JQueryAttr3Call() { JQueryAttr3Call() {

View File

@@ -249,7 +249,7 @@ case @expr.kind of
| 10 = @seq_expr | 10 = @seq_expr
| 11 = @conditional_expr | 11 = @conditional_expr
| 12 = @new_expr | 12 = @new_expr
| 13 = @callexpr | 13 = @call_expr
| 14 = @dotexpr | 14 = @dotexpr
| 15 = @indexexpr | 15 = @indexexpr
| 16 = @negexpr | 16 = @negexpr
@@ -365,7 +365,7 @@ case @expr.kind of
@propaccess = @dotexpr | @indexexpr; @propaccess = @dotexpr | @indexexpr;
@invokeexpr = @new_expr | @callexpr; @invokeexpr = @new_expr | @call_expr;
@unaryexpr = @negexpr | @plusexpr | @lognotexpr | @bitnotexpr | @typeofexpr | @voidexpr | @deleteexpr | @spreadelement; @unaryexpr = @negexpr | @plusexpr | @lognotexpr | @bitnotexpr | @typeofexpr | @voidexpr | @deleteexpr | @spreadelement;
@@ -1132,7 +1132,7 @@ xmllocations(
@dataflownode = @expr | @function_decl_stmt | @class_decl_stmt | @namespace_declaration | @enumdeclaration | @property; @dataflownode = @expr | @function_decl_stmt | @class_decl_stmt | @namespace_declaration | @enumdeclaration | @property;
@optionalchainable = @callexpr | @propaccess; @optionalchainable = @call_expr | @propaccess;
isOptionalChaining(int id: @optionalchainable ref); isOptionalChaining(int id: @optionalchainable ref);

View File

@@ -242,7 +242,7 @@
<v>19023</v> <v>19023</v>
</e> </e>
<e> <e>
<k>@callexpr</k> <k>@call_expr</k>
<v>487075</v> <v>487075</v>
</e> </e>
<e> <e>