 
 # Tokens pairs that, in immediate succession, indicate an implicit call.
 IMPLICIT_FUNC: ['IDENTIFIER', 'SUPER', ')', 'CALL_END', ']', 'INDEX_END']
-IMPLICIT_END:  ['IF', 'UNLESS', 'FOR', 'WHILE', 'TERMINATOR', 'OUTDENT']
+IMPLICIT_BLOCK:['->', '=>', '{', '[', ',']
+IMPLICIT_END:  ['IF', 'UNLESS', 'FOR', 'WHILE', 'TERMINATOR', 'INDENT', 'OUTDENT']
 IMPLICIT_CALL: ['IDENTIFIER', 'NUMBER', 'STRING', 'JS', 'REGEX', 'NEW', 'PARAM_START',
                  'TRY', 'DELETE', 'TYPEOF', 'SWITCH',
                  'TRUE', 'FALSE', 'YES', 'NO', 'ON', 'OFF', '!', '!!', 'NOT',

re::add_implicit_parentheses: ->
  stack: [0]
  @scan_tokens (prev, token, post, i) =>
    stack.push(0) if token[0] is 'INDENT'
    if token[0] is 'OUTDENT'
      last: stack.pop()
      stack[stack.length - 1] += last
    if stack[stack.length - 1] > 0 and (IMPLICIT_END.indexOf(token[0]) >= 0 or !post?)
      idx: if token[0] is 'OUTDENT' then i + 1 else i
      for tmp in [0...stack[stack.length - 1]]
        @tokens.splice(idx, 0, ['CALL_END', ')', token[2]])
      size: stack[stack.length - 1] + 1
      stack[stack.length - 1]: 0
      return size
    return 1 unless prev and IMPLICIT_FUNC.indexOf(prev[0]) >= 0 and IMPLICIT_CALL.indexOf(token[0]) >= 0
    @tokens.splice(i, 0, ['CALL_START', '(', token[2]])
    stack[stack.length - 1] += 1
    return 2

      throw "too many " + token[1] if levels[open] < 0
    return 1
  unclosed: key for key, value of levels when value > 0
  throw new Error("unclosed " + unclosed[0]) if unclosed.length

# We'd like to support syntax like this:
#    el.click((event) ->
