aboutsummaryrefslogtreecommitdiff
path: root/lib/parse.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2021-02-10 12:40:57 +0000
committerGitHub <noreply@github.com>2021-02-10 20:40:57 +0800
commitc6e287331d8bf547e1d8dc578847224b137e866b (patch)
treeda25c66d90200dd456163afbbac5479b46a56ec5 /lib/parse.js
parenta98ec7e4df148fd8fb745e25ac3e1da4bf87159b (diff)
downloadtracifyjs-c6e287331d8bf547e1d8dc578847224b137e866b.tar.gz
tracifyjs-c6e287331d8bf547e1d8dc578847224b137e866b.zip
fix corner cases in `inline` (#4640)
fixes #4639
Diffstat (limited to 'lib/parse.js')
-rw-r--r--lib/parse.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/parse.js b/lib/parse.js
index ef0fc49a..27803f2e 100644
--- a/lib/parse.js
+++ b/lib/parse.js
@@ -1166,7 +1166,9 @@ function parse($TEXT, options) {
function arrow(exprs, start, async) {
var was_async = S.in_async;
+ var was_gen = S.in_generator;
S.in_async = async;
+ S.in_generator = false;
var was_funarg = S.in_funarg;
S.in_funarg = S.in_function;
var argnames = exprs.map(to_funarg);
@@ -1196,6 +1198,7 @@ function parse($TEXT, options) {
--S.in_function;
S.in_loop = loop;
S.labels = labels;
+ S.in_generator = was_gen;
S.in_async = was_async;
return new (async ? AST_AsyncArrow : AST_Arrow)({
start: start,