Skip to content

Commit 621e702

Browse files
committed
renamed "hasDeclareKeyword" to "has_declare_keyword"
1 parent 49b71d5 commit 621e702

File tree

17 files changed

+35
-29
lines changed

17 files changed

+35
-29
lines changed

javascript/extractor/src/com/semmle/js/ast/DeclarationFlags.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public class DeclarationFlags {
4646
"hasProtectedKeyword",
4747
"isOptionalMember",
4848
"hasDefiniteAssignmentAssertion",
49-
"hasDeclareKeyword");
49+
"has_declare_keyword");
5050

5151
public static boolean isComputed(int flags) {
5252
return (flags & computed) != 0;

javascript/extractor/src/com/semmle/js/extractor/ASTExtractor.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -822,7 +822,7 @@ public Label visit(YieldExpression nd, Context c) {
822822
public Label visit(VariableDeclaration nd, Context c) {
823823
Label key = super.visit(nd, c);
824824
if (nd.hasDeclareKeyword()) {
825-
trapwriter.addTuple("hasDeclareKeyword", key);
825+
trapwriter.addTuple("has_declare_keyword", key);
826826
}
827827
visitAll(nd.getDeclarations(), key);
828828
return key;
@@ -881,7 +881,7 @@ public Label visit(BlockStatement nd, Context c) {
881881
public Label visit(FunctionDeclaration nd, Context c) {
882882
Label key = super.visit(nd, c);
883883
if (nd.hasDeclareKeyword()) {
884-
trapwriter.addTuple("hasDeclareKeyword", key);
884+
trapwriter.addTuple("has_declare_keyword", key);
885885
}
886886
extractFunction(nd, key);
887887
emitStaticType(nd, key);
@@ -1284,7 +1284,7 @@ public Label visit(TemplateElement nd, Context c) {
12841284
public Label visit(ClassDeclaration nd, Context c) {
12851285
Label lbl = super.visit(nd, c);
12861286
if (nd.hasDeclareKeyword()) {
1287-
trapwriter.addTuple("hasDeclareKeyword", lbl);
1287+
trapwriter.addTuple("has_declare_keyword", lbl);
12881288
}
12891289
if (nd.hasAbstractKeyword()) {
12901290
trapwriter.addTuple("isAbstractClass", lbl);
@@ -1361,7 +1361,7 @@ public Label visit(NamespaceDeclaration nd, Context c) {
13611361
nd.isInstantiated() ? IdContext.varAndNamespaceDecl : IdContext.namespaceDecl;
13621362
visit(nd.getName(), lbl, -1, context);
13631363
if (nd.hasDeclareKeyword()) {
1364-
trapwriter.addTuple("hasDeclareKeyword", lbl);
1364+
trapwriter.addTuple("has_declare_keyword", lbl);
13651365
}
13661366
DeclaredNames hoistedVars =
13671367
scopeManager.collectDeclaredNames(nd.getBody(), isStrict, false, DeclKind.none);
@@ -1539,7 +1539,7 @@ public Label visit(MemberDefinition<?> nd, Context c) {
15391539
}
15401540

15411541
if (nd.hasDeclareKeyword()) {
1542-
trapwriter.addTuple("hasDeclareKeyword", methkey);
1542+
trapwriter.addTuple("has_declare_keyword", methkey);
15431543
}
15441544

15451545
return methkey;
@@ -1947,7 +1947,7 @@ public Label visit(EnumDeclaration nd, Context c) {
19471947
trapwriter.addTuple("isConstEnum", key);
19481948
}
19491949
if (nd.hasDeclareKeyword()) {
1950-
trapwriter.addTuple("hasDeclareKeyword", key);
1950+
trapwriter.addTuple("has_declare_keyword", key);
19511951
}
19521952
emitNodeSymbol(nd, key);
19531953
return key;
@@ -1968,7 +1968,7 @@ public Label visit(EnumMember nd, Context c) {
19681968
@Override
19691969
public Label visit(ExternalModuleDeclaration nd, Context c) {
19701970
Label key = super.visit(nd, c);
1971-
trapwriter.addTuple("hasDeclareKeyword", key);
1971+
trapwriter.addTuple("has_declare_keyword", key);
19721972
visit(nd.getName(), key, -1, IdContext.label);
19731973
DeclaredNames hoistedVars =
19741974
scopeManager.collectDeclaredNames(nd.getBody(), isStrict, false, DeclKind.none);
@@ -2013,7 +2013,7 @@ public Label visit(GlobalAugmentationDeclaration nd, Context c) {
20132013
// The fake scope does not exist at the QL level, as it is indistinguishable
20142014
// from the global scope.
20152015
Label key = super.visit(nd, c);
2016-
trapwriter.addTuple("hasDeclareKeyword", key);
2016+
trapwriter.addTuple("has_declare_keyword", key);
20172017
DeclaredNames hoistedVars =
20182018
scopeManager.collectDeclaredNames(nd.getBody(), isStrict, false, DeclKind.none);
20192019
DeclaredNames lexicalVars =

javascript/extractor/tests/ts/output/trap/conditionalTypes.ts.trap

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9711,7 +9711,7 @@ stmts(#23113,17,#22805,13,"declare ... number;")
97119711
locations_default(#23114,#10000,94,3,94,42)
97129712
hasLocation(#23113,#23114)
97139713
stmt_containers(#23113,#22805)
9714-
hasDeclareKeyword(#23113)
9714+
has_declare_keyword(#23113)
97159715
#23115=*
97169716
exprs(#23115,78,#23113,-1,"foo")
97179717
hasLocation(#23115,#22008)
@@ -9751,7 +9751,7 @@ stmts(#23123,17,#22805,14,"declare ... string;")
97519751
locations_default(#23124,#10000,95,3,95,42)
97529752
hasLocation(#23123,#23124)
97539753
stmt_containers(#23123,#22805)
9754-
hasDeclareKeyword(#23123)
9754+
has_declare_keyword(#23123)
97559755
#23125=*
97569756
exprs(#23125,78,#23123,-1,"foo")
97579757
hasLocation(#23125,#22030)
@@ -9789,7 +9789,7 @@ stmts(#23132,17,#22805,15,"declare ... number;")
97899789
locations_default(#23133,#10000,96,3,96,60)
97909790
hasLocation(#23132,#23133)
97919791
stmt_containers(#23132,#22805)
9792-
hasDeclareKeyword(#23132)
9792+
has_declare_keyword(#23132)
97939793
#23134=*
97949794
exprs(#23134,78,#23132,-1,"foo")
97959795
hasLocation(#23134,#22052)

javascript/extractor/tests/ts/output/trap/declareClass.ts.trap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ hasLocation(#20001,#20016)
5454
stmts(#20017,26,#20001,0,"declare class C {}")
5555
hasLocation(#20017,#20003)
5656
stmt_containers(#20017,#20001)
57-
hasDeclareKeyword(#20017)
57+
has_declare_keyword(#20017)
5858
#20018=*
5959
exprs(#20018,78,#20017,0,"C")
6060
hasLocation(#20018,#20009)

javascript/extractor/tests/ts/output/trap/enum.ts.trap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -688,7 +688,7 @@ exprContainers(#20248,#20001)
688688
literals("b","b",#20248)
689689
decl(#20248,#20243)
690690
typedecl(#20248,#20244)
691-
hasDeclareKeyword(#20238)
691+
has_declare_keyword(#20238)
692692
#20249=*
693693
stmts(#20249,36,#20001,2,"const e ... +2, b }")
694694
hasLocation(#20249,#20009)
@@ -806,7 +806,7 @@ literals("b","b",#20275)
806806
decl(#20275,#20270)
807807
typedecl(#20275,#20271)
808808
isConstEnum(#20265)
809-
hasDeclareKeyword(#20265)
809+
has_declare_keyword(#20265)
810810
#20276=*
811811
stmts(#20276,17,#20001,4,"functio ... rn x; }")
812812
hasLocation(#20276,#20015)

javascript/extractor/tests/ts/output/trap/exportasnamespace.d.ts.trap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ stmts(#20035,17,#20034,-1,"declare ... foo();")
107107
locations_default(#20036,#10000,1,8,1,30)
108108
hasLocation(#20035,#20036)
109109
stmt_containers(#20035,#20001)
110-
hasDeclareKeyword(#20035)
110+
has_declare_keyword(#20035)
111111
#20037=*
112112
exprs(#20037,78,#20035,-1,"foo")
113113
hasLocation(#20037,#20013)

javascript/extractor/tests/ts/output/trap/externalmodule.ts.trap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ stmts(#20082,37,#20001,0,"declare ... = M;\n}")
234234
locations_default(#20083,#10000,1,1,9,1)
235235
hasLocation(#20082,#20083)
236236
stmt_containers(#20082,#20001)
237-
hasDeclareKeyword(#20082)
237+
has_declare_keyword(#20082)
238238
#20084=*
239239
exprs(#20084,4,#20082,-1,"""X""")
240240
hasLocation(#20084,#20025)

javascript/extractor/tests/ts/output/trap/functiondecorators.ts.trap

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,7 @@ local_type_names(#20223,"C",#20000)
592592
stmts(#20224,18,#20001,0,"declare var A : any;")
593593
hasLocation(#20224,#20003)
594594
stmt_containers(#20224,#20001)
595-
hasDeclareKeyword(#20224)
595+
has_declare_keyword(#20224)
596596
#20225=*
597597
exprs(#20225,64,#20224,0,"A : any")
598598
#20226=@"loc,{#10000},1,13,1,19"
@@ -619,7 +619,7 @@ literals("any","any",#20229)
619619
stmts(#20230,18,#20001,1,"declare var B : any;")
620620
hasLocation(#20230,#20005)
621621
stmt_containers(#20230,#20001)
622-
hasDeclareKeyword(#20230)
622+
has_declare_keyword(#20230)
623623
#20231=*
624624
exprs(#20231,64,#20230,0,"B : any")
625625
#20232=@"loc,{#10000},2,13,2,19"
@@ -646,7 +646,7 @@ literals("any","any",#20235)
646646
stmts(#20236,18,#20001,2,"declare var C : any;")
647647
hasLocation(#20236,#20007)
648648
stmt_containers(#20236,#20001)
649-
hasDeclareKeyword(#20236)
649+
has_declare_keyword(#20236)
650650
#20237=*
651651
exprs(#20237,64,#20236,0,"C : any")
652652
#20238=@"loc,{#10000},3,13,3,19"

javascript/extractor/tests/ts/output/trap/nobody.ts.trap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -702,7 +702,7 @@ local_type_names(#20254,"C",#20000)
702702
stmts(#20255,17,#20001,0,"declare ... on f();")
703703
hasLocation(#20255,#20020)
704704
stmt_containers(#20255,#20001)
705-
hasDeclareKeyword(#20255)
705+
has_declare_keyword(#20255)
706706
#20256=*
707707
exprs(#20256,78,#20255,-1,"f")
708708
hasLocation(#20256,#20079)
@@ -940,7 +940,7 @@ stmts(#20312,26,#20001,2,"declare ... mber;\n}")
940940
locations_default(#20313,#10000,18,1,29,1)
941941
hasLocation(#20312,#20313)
942942
stmt_containers(#20312,#20001)
943-
hasDeclareKeyword(#20312)
943+
has_declare_keyword(#20312)
944944
isAbstractClass(#20312)
945945
#20314=*
946946
exprs(#20314,78,#20312,0,"D")

javascript/extractor/tests/ts/output/trap/thisparameter.ts.trap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ stmt_containers(#20186,#20178)
532532
stmts(#20188,17,#20001,2,"declare ... umber);")
533533
hasLocation(#20188,#20011)
534534
stmt_containers(#20188,#20001)
535-
hasDeclareKeyword(#20188)
535+
has_declare_keyword(#20188)
536536
#20189=*
537537
exprs(#20189,78,#20188,-1,"ambient")
538538
hasLocation(#20189,#20091)

0 commit comments

Comments
 (0)