Skip to content

Commit

Permalink
more parens around literal objects/functions when first thing in a st…
Browse files Browse the repository at this point in the history
…atement

[ will this end? :-) ]
  • Loading branch information
mishoo committed Mar 22, 2011
1 parent 1eecae3 commit 55ddee9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/process.js
Original file line number Diff line number Diff line change
Expand Up @@ -1160,8 +1160,7 @@ function gen_code(ast, options) {
var a = slice($stack), self = a.pop(), p = a.pop();
while (p) {
if (p[0] == "stat") return true;
if ((p[0] == "seq" && p[1] === self) ||
(p[0] == "call" && p[1] === self) ||
if (((p[0] == "seq" || p[0] == "call" || p[0] == "dot" || p[0] == "sub") && p[1] === self) ||
((p[0] == "binary" || p[0] == "assign" || p[0] == "unary-postfix") && p[2] === self)) {
self = p;
p = a.pop();
Expand Down

0 comments on commit 55ddee9

Please sign in to comment.