mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-05-03 03:00:14 -04:00
rewriter: detectEnd no longer passes undefined as token, fixing #750
This commit is contained in:
@@ -46,9 +46,9 @@ class exports.Rewriter
|
||||
true
|
||||
|
||||
detectEnd: (i, condition, action) ->
|
||||
{tokens} = this
|
||||
levels = 0
|
||||
loop
|
||||
token = @tokens[i]
|
||||
while token = tokens[i]
|
||||
return action.call this, token, i if levels is 0 and condition.call this, token, i
|
||||
return action.call this, token, i - 1 if not token or levels < 0
|
||||
if include EXPRESSION_START, token[0]
|
||||
|
||||
Reference in New Issue
Block a user