fix class extends expression (#1956)

This commit is contained in:
kzc
2017-05-16 15:29:25 -04:00
committed by Alex Lam S.L
parent c22d26b483
commit ebb469e4cd
2 changed files with 24 additions and 2 deletions

View File

@@ -1474,10 +1474,20 @@ function OutputStream(options) {
output.space();
}
if (self.extends) {
var parens = self.extends instanceof AST_Binary ||
self.extends instanceof AST_Conditional;
output.print("extends");
output.space();
if (parens) {
output.print("(");
} else {
output.space();
}
self.extends.print(output);
output.space();
if (parens) {
output.print(")");
} else {
output.space();
}
}
if (self.properties.length > 0) output.with_block(function(){
self.properties.forEach(function(prop, i){