mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-05-03 03:00:14 -04:00
rewriter: followed up d03d288
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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']
|
||||
|
||||
Reference in New Issue
Block a user