Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

avoid double-parens on calls on function expressions (fixes #313)

parentheses handling in gen_code got quite messy, should be cleaned up...
  • Loading branch information...
commit 08a8fcb01b66325c41ba687043cf4f0feb4f3b26 1 parent 82a8934
Mihai Bazon authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/process.js
2  lib/process.js
View
@@ -1632,7 +1632,7 @@ function gen_code(ast, options) {
if (expr[0] == "num") {
if (!/\./.test(expr[1]))
out += ".";
- } else if (needs_parens(expr))
+ } else if (expr[0] != "function" && needs_parens(expr))
out = "(" + out + ")";
while (i < arguments.length)
out += "." + make_name(arguments[i++]);
Please sign in to comment.
Something went wrong with that request. Please try again.