diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2019-04-17 16:19:08 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-17 16:19:08 +0800 |
commit | 21cd7e3f571030c889619b39287ac8420044bcc4 (patch) | |
tree | 03c3730f47e0cc28fac5d37b46246f27d35763dc /lib/scope.js | |
parent | 5172ba5f2ade22716e65ff2333218fc08996bfcc (diff) | |
download | tracifyjs-21cd7e3f571030c889619b39287ac8420044bcc4.tar.gz tracifyjs-21cd7e3f571030c889619b39287ac8420044bcc4.zip |
reduce test exports (#3361)
Diffstat (limited to 'lib/scope.js')
-rw-r--r-- | lib/scope.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/scope.js b/lib/scope.js index b6bfe1a8..47e05da2 100644 --- a/lib/scope.js +++ b/lib/scope.js @@ -342,7 +342,7 @@ function next_mangled_name(scope, options, def) { } while (true) { name = base54(++scope.cname); - if (in_use[name] || !is_identifier(name) || options.reserved.has[name]) continue; + if (in_use[name] || RESERVED_WORDS[name] || options.reserved.has[name]) continue; if (!names[name]) break; holes.push(scope.cname); } @@ -422,7 +422,7 @@ AST_Toplevel.DEFMETHOD("mangle_names", function(options) { var name; do { name = base54(++lname); - } while (!is_identifier(name)); + } while (RESERVED_WORDS[name]); node.mangled_name = name; return true; } @@ -493,7 +493,7 @@ AST_Toplevel.DEFMETHOD("expand_names", function(options) { var name; do { name = base54(cname++); - } while (avoid[name] || !is_identifier(name)); + } while (avoid[name] || RESERVED_WORDS[name]); return name; } |