workaround webkit parsing error (#2056)

apply `webkit` to jetstream tests
This commit is contained in:
Alex Lam S.L
2017-06-06 04:06:42 +08:00
committed by GitHub
parent 540220b91b
commit 27c5284d3d
4 changed files with 37 additions and 2 deletions

View File

@@ -70,6 +70,7 @@ function OutputStream(options) {
semicolons : true,
shebang : true,
source_map : null,
webkit : false,
width : 80,
wrap_iife : false,
}, true);
@@ -597,6 +598,13 @@ function OutputStream(options) {
return true;
}
if (output.option('webkit')) {
var p = output.parent();
if (p instanceof AST_PropAccess && p.expression === this) {
return true;
}
}
if (output.option('wrap_iife')) {
var p = output.parent();
return p instanceof AST_Call && p.expression === this;