File tree Expand file tree Collapse file tree 4 files changed +465
-2
lines changed
Expand file tree Collapse file tree 4 files changed +465
-2
lines changed Original file line number Diff line number Diff line change @@ -448,7 +448,11 @@ private DynamicImport parseDynamicImport(Position startLoc) {
448448 protected Statement parseForStatement (Position startLoc ) {
449449 int startPos = this .start ;
450450 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+ }
452456 Statement forStmt = super .parseForStatement (startLoc );
453457 if (isAwait ) {
454458 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 {
4141 * A version identifier that should be updated every time the extractor changes in such a way that
4242 * it may produce different tuples for the same file under the same {@link ExtractorConfig}.
4343 */
44- public static final String EXTRACTOR_VERSION = "2022-06-27 " ;
44+ public static final String EXTRACTOR_VERSION = "2022-07-11 " ;
4545
4646 public static final Pattern NEWLINE = Pattern .compile ("\n " );
4747
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