diff options
author | max99x <max99x@gmail.com> | 2011-08-30 12:18:00 +0300 |
---|---|---|
committer | max99x <max99x@gmail.com> | 2011-08-30 12:18:00 +0300 |
commit | c746d2005286626f8a468b32df59073c7ec88639 (patch) | |
tree | beed6b576de31627b51cd6dde4681fbcfbc99f37 | |
parent | d9bb2a2607f95b358775eff1902dd0743ceb6b17 (diff) |
Made sure uglify's code generator re-parenthesizes anonymous functions.
-rw-r--r-- | tools/eliminator/node_modules/uglify-js/lib/process.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/eliminator/node_modules/uglify-js/lib/process.js b/tools/eliminator/node_modules/uglify-js/lib/process.js index 85709857..c3abb6f8 100644 --- a/tools/eliminator/node_modules/uglify-js/lib/process.js +++ b/tools/eliminator/node_modules/uglify-js/lib/process.js @@ -1751,7 +1751,9 @@ function gen_code(ast, options) { out += " " + make_name(name); } out += "(" + add_commas(MAP(args, make_name)) + ")"; - return add_spaces([ out, make_block(body) ]); + var result = add_spaces([ out, make_block(body) ]) + if (!name) result = "(" + result + ")"; + return result; }; function must_has_semicolon(node) { |