Skip to content

Commit

Permalink
Fix parens for NaN
Browse files Browse the repository at this point in the history
Close #116
  • Loading branch information
mishoo committed Feb 6, 2013
1 parent de7ec7f commit fdf8b5e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/output.js
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,12 @@ function OutputStream(options) {
return true;
});

PARENS(AST_NaN, function(output){
var p = output.parent();
if (p instanceof AST_PropAccess && p.expression === this)
return true;
});

function assign_and_conditional_paren_rules(output) {
var p = output.parent();
// !(a = false) → true
Expand Down

0 comments on commit fdf8b5e

Please sign in to comment.