@@ -55,6 +55,7 @@ function OutputStream(options) {
|
||||
beautify : false,
|
||||
braces : false,
|
||||
comments : false,
|
||||
extendscript : false,
|
||||
galio : false,
|
||||
ie : false,
|
||||
indent_level : 4,
|
||||
@@ -700,6 +701,7 @@ function OutputStream(options) {
|
||||
if (p instanceof AST_Class) return true;
|
||||
// (x++)[y]
|
||||
// (typeof x).y
|
||||
// https://github.com/mishoo/UglifyJS/issues/115
|
||||
if (p instanceof AST_PropAccess) return p.expression === this;
|
||||
// (~x)`foo`
|
||||
if (p instanceof AST_Template) return p.tag === this;
|
||||
@@ -875,7 +877,9 @@ function OutputStream(options) {
|
||||
return needs_parens_assign_cond(this, output);
|
||||
});
|
||||
PARENS(AST_Conditional, function(output) {
|
||||
return needs_parens_assign_cond(this, output);
|
||||
return needs_parens_assign_cond(this, output)
|
||||
// https://github.com/mishoo/UglifyJS/issues/1144
|
||||
|| output.option("extendscript") && output.parent() instanceof AST_Conditional;
|
||||
});
|
||||
PARENS(AST_Yield, function(output) {
|
||||
return needs_parens_assign_cond(this, output);
|
||||
|
||||
Reference in New Issue
Block a user