Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 99f8887

Browse files
committed
renamed "isForAwaitOf" to "is_for_await_of"
1 parent 621e702 commit 99f8887

7 files changed

Lines changed: 12 additions & 5 deletions

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1084,7 +1084,7 @@ public Label visit(EnhancedForStatement nd, Context c) {
10841084
contextManager.leaveLoopStmt();
10851085
if (!lexicals.isEmpty()) scopeManager.leaveScope();
10861086
if (nd instanceof ForOfStatement && ((ForOfStatement) nd).isAwait())
1087-
trapwriter.addTuple("isForAwaitOf", key);
1087+
trapwriter.addTuple("is_for_await_of", key);
10881088
return key;
10891089
}
10901090

javascript/extractor/tests/esnext/output/trap/async-generators.js.trap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ decl(#20092,#20080)
283283
stmts(#20093,0,#20084,2,";")
284284
hasLocation(#20093,#20062)
285285
stmt_containers(#20093,#20076)
286-
isForAwaitOf(#20084)
286+
is_for_await_of(#20084)
287287
#20094=*
288288
entry_cfg_node(#20094,#20001)
289289
#20095=@"loc,{#10000},1,1,1,0"

javascript/ql/src/semmle/javascript/Aliases.qll

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,3 +110,8 @@ deprecated predicate isInstantiated(NamespaceDeclaration decl) { is_instantiated
110110
* Alias for the predicate `has_declare_keyword` defined in the .dbscheme.
111111
*/
112112
deprecated predicate hasDeclareKeyword(ASTNode stmt) { has_declare_keyword(stmt) }
113+
/**
114+
* Alias for the predicate `is_for_await_of` defined in the .dbscheme.
115+
* Use `ForOfStmt#isAwait()` instead.
116+
*/
117+
deprecated predicate isForAwaitOf(ForOfStmt forof) { is_for_await_of(forof) }

javascript/ql/src/semmle/javascript/Stmt.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -895,7 +895,7 @@ class ForOfStmt extends @forofstmt, EnhancedForLoop {
895895
/**
896896
* Holds if this is a `for-await-of` statement.
897897
*/
898-
predicate isAwait() { isForAwaitOf(this) }
898+
predicate isAwait() { is_for_await_of(this) }
899899
}
900900

901901
/**

javascript/ql/src/semmlecode.javascript.dbscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ is_instantiated(unique int decl: @namespacedeclaration ref);
203203
@declarablenode = @declstmt | @namespacedeclaration | @classdeclstmt | @functiondeclstmt | @enumdeclaration | @externalmoduledeclaration | @globalaugmentationdeclaration | @field;
204204
has_declare_keyword(unique int stmt: @declarablenode ref);
205205

206-
isForAwaitOf(unique int forof: @forofstmt ref);
206+
is_for_await_of(unique int forof: @forofstmt ref);
207207

208208
// expressions
209209
#keyset[parent, idx]

javascript/ql/src/semmlecode.javascript.dbscheme.stats

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9216,7 +9216,7 @@
92169216
</dependencies>
92179217
</relation>
92189218
<relation>
9219-
<name>isForAwaitOf</name>
9219+
<name>is_for_await_of</name>
92209220
<cardinality>1</cardinality>
92219221
<columnsizes>
92229222
<e>

javascript/upgrades/c73fbfca57f3d593b9ff50c6aa3a886d6888efec/upgrade.properties

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,5 @@ is_instantiated.rel: reorder isInstantiated.rel(int decl) decl
1818
isInstantiated.rel: delete
1919
has_declare_keyword.rel: reorder hasDeclareKeyword.rel(int stmt) stmt
2020
hasDeclareKeyword.rel: delete
21+
is_for_await_of.rel: reorder isForAwaitOf.rel(int forof) forof
22+
isForAwaitOf.rel: delete

0 commit comments

Comments
 (0)