     levels = 0
     loop
       token = @tokens[i]
-      return action token, i if levels is 0 and condition token, i
-      return action token, i - 1 if not token or levels < 0
+      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
       levels += 1 if include EXPRESSION_START, token[0]
       levels -= 1 if include EXPRESSION_END, token[0]
       i += 1

        stack.push '{'
        idx = if before[0] is '@' then i - 2 else i - 1
        @tokens.splice idx, 0, ['{', '{', token[2]]
        condition = (token, i) =>
          [one, two, three] = @tokens.slice(i + 1, i + 4)
          ((token[0] in ['TERMINATOR', 'OUTDENT']) and not ((two and two[0] is ':') or (one and one[0] is '@' and three and three[0] is ':'))) or
            (token[0] is ',' and one and (one[0] not in ['IDENTIFIER', 'STRING', '@', 'TERMINATOR', 'OUTDENT']))
        action = (token, i) =>
          @tokens.splice i, 0, ['}', '}', token[2]]
        @detectEnd i + 2, condition, action
        return 2

      if prev and prev.spaced and include(IMPLICIT_FUNC, prev[0]) and include(IMPLICIT_CALL, token[0]) and
          not (token[0] is '!' and (post[0] in ['IN', 'OF']))
        @tokens.splice i, 0, ['CALL_START', '(', token[2]]
        condition = (token, i) ->
          [before, prev] = @tokens.slice(i - 2, i + 1)
          (not token.generated and @tokens[i - 1][0] isnt ',' and include(IMPLICIT_END, token[0]) and
            not (token[0] is 'INDENT' and (include(IMPLICIT_BLOCK, prev[0]) or before[0] is 'CLASS'))) or
            token[0] is 'PROPERTY_ACCESS' and prev[0] is 'OUTDENT'
        action = (token, i) ->
          idx = if token[0] is 'OUTDENT' then i + 1 else i
          @tokens.splice idx, 0, ['CALL_END', ')', token[2]]
        @detectEnd i + 1, condition, action
