Specialized heuristic lexer for JS to identify complex literals