 
 # Tokens that end a line.
 LINEBREAKS       = ['TERMINATOR', 'INDENT', 'OUTDENT']
+
+# Tokens that close open calls when they follow a newline.
+CALL_CLOSERS = ['.', '?.', '::', '?::']

      #     .g b
      #     .h a
      #
      if (prevTag is 'OUTDENT' or prevToken.newLine) and inImplicitCall() and
          tag in ['.', '?.', '::', '?::']
        endImplicitCall()
        return forward(1)

      stackTop()[2].sameLine = no if inImplicitObject() and tag in LINEBREAKS


      token[1] isnt ';' and token[0] in SINGLE_CLOSERS and
      not (token[0] is 'TERMINATOR' and @tag(i + 1) in EXPRESSION_CLOSE) and
      not (token[0] is 'ELSE' and starter isnt 'THEN') and
      not (token[0] in ['CATCH', 'FINALLY'] and starter in ['->', '=>']) or
      token[0] in CALL_CLOSERS and @tokens[i - 1].newLine

    action = (token, i) ->
      @tokens.splice (if @tag(i - 1) is ',' then i - 1 else i), 0, outdent
