| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 87461fe commit e7f009e
4 files 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 | |
|---|---|---|---|
@@ -0,0 +1,9 @@ | |||
| 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 | + } | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments