public
/
UglifyJS.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a90c1ae
)
parenthesize property access when it's the expression in New
author
Mihai Bazon
<mihai@bazon.net>
Wed, 7 Nov 2012 10:26:33 +0000
(12:26 +0200)
committer
Mihai Bazon
<mihai@bazon.net>
Wed, 7 Nov 2012 10:26:33 +0000
(12:26 +0200)
refs #35
lib/output.js
patch
|
blob
|
history
diff --git
a/lib/output.js
b/lib/output.js
index
2a17768
..
321c722
100644
(file)
--- a/
lib/output.js
+++ b/
lib/output.js
@@
-468,6
+468,11
@@
function OutputStream(options) {
}
});
+ PARENS(AST_PropAccess, function(output){
+ var p = output.parent();
+ return p instanceof AST_New && p.expression === this;
+ });
+
PARENS(AST_Call, function(output){
var p = output.parent();
return p instanceof AST_New && p.expression === this;