public
/
UglifyJS.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5346fb9
)
parenthesize a Call expression when its parent is New
author
Mihai Bazon
<mihai@bazon.net>
Wed, 7 Nov 2012 09:36:15 +0000
(11:36 +0200)
committer
Mihai Bazon
<mihai@bazon.net>
Wed, 7 Nov 2012 09:36:15 +0000
(11:36 +0200)
fix #35
lib/output.js
patch
|
blob
|
history
diff --git
a/lib/output.js
b/lib/output.js
index
46ed126
..
22ee31e
100644
(file)
--- a/
lib/output.js
+++ b/
lib/output.js
@@
-468,6
+468,11
@@
function OutputStream(options) {
}
});
+ PARENS(AST_Call, function(output){
+ var p = output.parent();
+ return p instanceof AST_New && p.expression === this;
+ });
+
PARENS(AST_New, function(output){
var p = output.parent();
// (new Date).getTime();