rewriter: followed up d03d288

This commit is contained in:
satyr 2011-09-17 09:16:30 +09:00
parent d03d288a98
commit 3cdee749c6
2 changed files with 2 additions and 6 deletions

View File

@ -143,9 +143,7 @@
var action, noCall;
noCall = false;
action = function(token, i) {
var idx;
idx = token[0] === 'OUTDENT' ? i : i;
return this.tokens.splice(idx, 0, ['CALL_END', ')', token[2]]);
return this.tokens.splice(i, 0, ['CALL_END', ')', token[2]]);
};
return this.scanTokens(function(token, i, tokens) {
var callObject, current, next, prev, seenControl, seenSingle, tag, _ref, _ref2, _ref3;

View File

@ -131,9 +131,7 @@ class exports.Rewriter
# deal with them.
addImplicitParentheses: ->
noCall = no
action = (token, i) ->
idx = if token[0] is 'OUTDENT' then i else i
@tokens.splice idx, 0, ['CALL_END', ')', token[2]]
action = (token, i) -> @tokens.splice i, 0, ['CALL_END', ')', token[2]]
@scanTokens (token, i, tokens) ->
tag = token[0]
noCall = yes if tag in ['CLASS', 'IF']