Take out object call rewriter condition

This commit is contained in:
Karl Guertin 2010-12-18 15:27:19 -05:00
parent f0a62e83c8
commit e692e7cd9e
2 changed files with 2 additions and 2 deletions

View File

@ -177,7 +177,7 @@
return 1;
}
tokens.splice(i, 0, ['CALL_START', '(', token[2]]);
this.detectEnd(i + (callObject ? 2 : 1), function(token, i) {
this.detectEnd(i + 1, function(token, i) {
var post, _ref;
if (!seenSingle && token.fromThen) {
return true;

View File

@ -147,7 +147,7 @@ class exports.Rewriter
prev?.spaced and (prev.call or prev[0] in IMPLICIT_FUNC) and
(tag in IMPLICIT_CALL or not (token.spaced or token.newLine) and tag in IMPLICIT_UNSPACED_CALL)
tokens.splice i, 0, ['CALL_START', '(', token[2]]
@detectEnd i + (if callObject then 2 else 1), (token, i) ->
@detectEnd i + 1, (token, i) ->
return yes if not seenSingle and token.fromThen
[tag] = token
seenSingle = yes if tag in ['IF', 'ELSE', 'UNLESS', '->', '=>']