diff --git a/lib/rewriter.js b/lib/rewriter.js index 5dbbfee0..2b56cdd8 100644 --- a/lib/rewriter.js +++ b/lib/rewriter.js @@ -173,11 +173,6 @@ stack[stack.length - 1] += last; } open = stack[stack.length - 1] > 0; - if (tag === 'CALL_END' && calls < 0 && open) { - stack[stack.length - 1] -= 1; - this.tokens.splice(i, 0, ['CALL_END', ')', token[2]]); - return 2; - } if (!(typeof post !== "undefined" && post !== null) || (parens === 0 && include(IMPLICIT_END, tag))) { if (tag === 'INDENT' && prev && include(IMPLICIT_BLOCK, prev[0])) { return 1; diff --git a/src/rewriter.coffee b/src/rewriter.coffee index da75d34b..1a4cc81b 100644 --- a/src/rewriter.coffee +++ b/src/rewriter.coffee @@ -123,10 +123,6 @@ exports.Rewriter: class Rewriter last: stack.pop() stack[stack.length - 1]: + last open: stack[stack.length - 1] > 0 - if tag is 'CALL_END' and calls < 0 and open - stack[stack.length - 1]: - 1 - @tokens.splice(i, 0, ['CALL_END', ')', token[2]]) - return 2 if !post? or (parens is 0 and include IMPLICIT_END, tag) return 1 if tag is 'INDENT' and prev and include IMPLICIT_BLOCK, prev[0] return 1 if tag is 'OUTDENT' and token.generated