mirror of
https://github.com/jashkenas/coffeescript.git
synced 2022-11-09 12:23:24 -05:00
Take out object call rewriter condition
This commit is contained in:
parent
f0a62e83c8
commit
e692e7cd9e
2 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
|
|
|
@ -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', '->', '=>']
|
||||
|
|
Loading…
Add table
Reference in a new issue