aboutsummaryrefslogtreecommitdiff
path: root/test/reduce.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2021-02-08 20:28:23 +0000
committerGitHub <noreply@github.com>2021-02-09 04:28:23 +0800
commite13d1e996909f68ee643df17fd7d87773c3e82a5 (patch)
treeb519e7a0cd2c3150de25964aaa3399be135eaa7a /test/reduce.js
parentaedc1e7fc9cab772734d559e149c0b4f70454321 (diff)
downloadtracifyjs-e13d1e996909f68ee643df17fd7d87773c3e82a5.tar.gz
tracifyjs-e13d1e996909f68ee643df17fd7d87773c3e82a5.zip
support `for [await]...of` statements (#4627)
Diffstat (limited to 'test/reduce.js')
-rw-r--r--test/reduce.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/reduce.js b/test/reduce.js
index bfc0c173..d5758ccc 100644
--- a/test/reduce.js
+++ b/test/reduce.js
@@ -134,8 +134,8 @@ module.exports = function reduce_test(testcase, minify_options, reduce_options)
if (parent instanceof U.AST_VarDef && parent.name === node) return;
// preserve for (var xxx; ...)
if (parent instanceof U.AST_For && parent.init === node && node instanceof U.AST_Definitions) return node;
- // preserve for (xxx in ...)
- if (parent instanceof U.AST_ForIn && parent.init === node) return node;
+ // preserve for (xxx in/of ...)
+ if (parent instanceof U.AST_ForEnumeration && parent.init === node) return node;
// node specific permutations with no parent logic
@@ -303,7 +303,7 @@ module.exports = function reduce_test(testcase, minify_options, reduce_options)
return to_statement(expr);
}
}
- else if (node instanceof U.AST_ForIn) {
+ else if (node instanceof U.AST_ForEnumeration) {
var expr;
switch ((node.start._permute * steps | 0) % 3) {
case 0: