         new_tokens.unshift t
       else
         out_tokens.push t
+        new_tokens.push text:'(', line:token.line, value:'(', type:'LITERAL'
+        new_tokens.push text:')', line:token.line, value:')', type:'LITERAL'
       f_token = {text:'function', line:token.line, value:'function', type:'IDENTIFIER'}
       new_tokens.unshift f_token
       out_tokens = out_tokens.concat new_tokens

  out_tokens = []
  close_paren_count = 0
  last_token = null
  
  i = 0
  while i < tokens.length
    token = tokens[i]
    if last_token?.type is 'IDENTIFIER' and last_token.value not in KEYWORDS and token.type in ['IDENTIFIER','NUMBER','STRING'] and token.value not in NOPAREN_WORDS
      close_paren_count += 1
      out_tokens.push text:'(', line:token.line, value:'(', type:'LITERAL'
    else if close_paren_count > 0 and token.type is 'NEWLINE'
      while close_paren_count > 0
        close_paren_count -= 1
        out_tokens.push text:')', line:token.line, value:')', type:'LITERAL'
    
    # push the current token unchanged
    out_tokens.push token
    last_token = token
    i += 1
  return out_tokens

  i = 0
  while i < tokens.length
    token = tokens[i]
    if last_token?.value is '-' and token?.value is '>'
      out_tokens.pop() # remove the dash
      new_tokens = []
