diff --git a/src/plugins/bangCall.js b/src/plugins/bangCall.js index 72a37c122c..87932e2f73 100644 --- a/src/plugins/bangCall.js +++ b/src/plugins/bangCall.js @@ -30,7 +30,8 @@ export default function(parser) { // ASI, ignore impossible args if ( - (this.isLineBreak() && this.state.indentLevel <= bangIndentLevel) || !this.state.type.startsExpr + (this.isLineBreak() && this.state.indentLevel <= bangIndentLevel) || + !this.state.type.startsExpr ) { return this.finishNode(node, nodeType); } @@ -90,7 +91,7 @@ export default function(parser) { return null; }; - // When subscripting, a newline always breaks up bang args. + // Subscripts to a bang call must appear at the arg indent level pp.shouldUnwindBangSubscript = function() { return this.isLineBreak() && (this.state.indentLevel <= this.state.bangUnwindLevel); }; diff --git a/src/plugins/tildeCall.js b/src/plugins/tildeCall.js index 6274e75f48..76a0c08556 100644 --- a/src/plugins/tildeCall.js +++ b/src/plugins/tildeCall.js @@ -31,9 +31,4 @@ export default function(parser) { return this.finishNode(node, "TildeCallExpression"); } }; - - // When subscripting, a newline always breaks up bang args. - pp.shouldUnwindBangSubscript = function() { - return this.isLineBreak() && (this.state.indentLevel <= this.state.bangUnwindLevel); - }; }