Skip to content
Browse files

better fix instead of f896f69

  • Loading branch information...
1 parent f896f69 commit 3a67143a8f17ed03813e046964498f77760ac822 @mishoo mishoo committed Sep 23, 2011
Showing with 4 additions and 1 deletion.
  1. +4 −1 lib/process.js
View
5 lib/process.js
@@ -1625,7 +1625,10 @@ function gen_code(ast, options) {
return out;
},
"call": function(func, args) {
- return make(func) + "(" + add_commas(MAP(args, function(expr){
+ var f = make(func);
+ if (f.charAt(0) != "(" && needs_parens(func))
+ f = "(" + f + ")";
+ return f + "(" + add_commas(MAP(args, function(expr){
return parenthesize(expr, "seq");
})) + ")";
},

0 comments on commit 3a67143

Please sign in to comment.
Something went wrong with that request. Please try again.