File tree Expand file tree Collapse file tree 5 files changed +469
-2
lines changed Expand file tree Collapse file tree 5 files changed +469
-2
lines changed Original file line number Diff line number Diff line change @@ -448,7 +448,11 @@ private DynamicImport parseDynamicImport(Position startLoc) {
448
448
protected Statement parseForStatement (Position startLoc ) {
449
449
int startPos = this .start ;
450
450
boolean isAwait = false ;
451
- if (this .inAsync && this .eatContextual ("await" )) isAwait = true ;
451
+ if (this .inAsync || (options .esnext () && !this .inFunction )) {
452
+ if (this .eatContextual ("await" )) {
453
+ isAwait = true ;
454
+ }
455
+ }
452
456
Statement forStmt = super .parseForStatement (startLoc );
453
457
if (isAwait ) {
454
458
if (forStmt instanceof ForOfStatement ) ((ForOfStatement ) forStmt ).setAwait (true );
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ public class Main {
41
41
* A version identifier that should be updated every time the extractor changes in such a way that
42
42
* it may produce different tuples for the same file under the same {@link ExtractorConfig}.
43
43
*/
44
- public static final String EXTRACTOR_VERSION = "2022-06-27 " ;
44
+ public static final String EXTRACTOR_VERSION = "2022-07-11 " ;
45
45
46
46
public static final Pattern NEWLINE = Pattern .compile ("\n " );
47
47
Original file line number Diff line number Diff line change
1
+ async function foo ( ) {
2
+ for await ( const call of calls ) {
3
+ call ( ) ;
4
+ }
5
+ }
6
+
7
+ for await ( const call of calls ) {
8
+ call ( ) ;
9
+ }
You can’t perform that action at this time.
0 commit comments