From fdf8b5eb71f762c6a021775609a6333ed110f17b Mon Sep 17 00:00:00 2001 From: Mihai Bazon Date: Wed, 6 Feb 2013 11:38:29 +0200 Subject: [PATCH] Fix parens for NaN Close #116 --- lib/output.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/output.js b/lib/output.js index ab9b82b4e57..b33bc63408c 100644 --- a/lib/output.js +++ b/lib/output.js @@ -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