skip over comments if tok is / if tok-1 is () if tok-2 in "if" "while" "for" "with" tok is start of regex literal else tok is divide else if tok-1 is {} if isBlock(tok-1) // named or anonymous function if tok-2 is () and tok-3 is "function" or tok-4 is "function" if function expression // how to determine is described below tok is divide else tok is start of regex literal else tok is start of rege