Fixed parsing error when await is used as an identifier in non-async context (#1376)

This commit is contained in:
Timofey Kachalov
2026-01-27 22:59:28 +04:00
committed by GitHub
parent 44028a147f
commit ccece3fef1
5 changed files with 52 additions and 1 deletions
+5 -1
View File
@@ -58,7 +58,11 @@ export class ASTParserFacade {
const comments: ESTree.Comment[] = [];
const config: acorn.Options = {
...inputConfig,
allowAwaitOutsideFunction: true,
allowAwaitOutsideFunction: false,
allowReserved: true,
allowImportExportEverywhere: true,
allowReturnOutsideFunction: true,
allowSuperOutsideMethod: true,
onComment: comments,
sourceType
};