We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8e26ceb commit 2003bc5Copy full SHA for 2003bc5
src/await.js
@@ -11,6 +11,12 @@ const visitorsWithoutAncestors = {
11
}
12
walk.base.ClassDeclaration(node, state, c);
13
},
14
+ ForOfStatement(node, state, c) {
15
+ if (node.await === true) {
16
+ state.containsAwait = true;
17
+ }
18
+ walk.base.ForOfStatement(node, state, c);
19
+ },
20
FunctionDeclaration(node, state) {
21
state.prepend(node, `${node.id.name}=`);
22
@@ -68,7 +74,7 @@ function processTopLevelAwait(src) {
68
74
const wrappedArray = wrapped.split('');
69
75
let root;
70
76
try {
71
- root = acorn.parse(wrapped, { ecmaVersion: 8 });
77
+ root = acorn.parse(wrapped, { ecmaVersion: 2019 });
72
78
} catch (err) {
73
79
return null;
80
0 commit comments