void () { doTest("//", "END_OF_LINE_COMMENT ('//')"); doTest("\\u002f\\u002F", "END_OF_LINE_COMMENT ('\\u002f\\u002F')"); doTest("//\n", "END_OF_LINE_COMMENT ('//')\nWHITE_SPACE ('\\n')"); doTest("//\\u000A", "END_OF_LINE_COMMENT ('//')\nWHITE_SPACE ('\\u000A')"); doTest("//x\n", "END_OF_LINE_COMMENT ('//x')\nWHITE_SPACE ('\\n')"); doTest("/\\u002fx\n", "END_OF_LINE_COMMENT ('/\\u002fx')\nWHITE_SPACE ('\\n')"); doTest("/*/ ", "C_STYLE_COMMENT ('/*/ ')"); doTest("/\\u002A/ ", "C_STYLE_COMMENT ('/\\u002A/ ')"); doTest("/**/ ", "C_STYLE_COMMENT ('/**/')\nWHITE_SPACE (' ')"); doTest("\\u002f**/ ", "C_STYLE_COMMENT ('\\u002f**/')\nWHITE_SPACE (' ')"); doTest("/*x*/ ", "C_STYLE_COMMENT ('/*x*/')\nWHITE_SPACE (' ')"); doTest("/*x\\u002a\\u002F\\u0020", "C_STYLE_COMMENT ('/*x\\u002a\\u002F')\nWHITE_SPACE ('\\u0020')"); doTest("/***/ ", "DOC_COMMENT ('/***/')\nWHITE_SPACE (' ')"); doTest("/*\\u002a*/ ", "DOC_COMMENT ('/*\\u002a*/')\nWHITE_SPACE (' ')"); doTest("/**x*/ ", "DOC_COMMENT ('/**x*/')\nWHITE_SPACE (' ')"); doTest("/**\\u0078*/ ", "DOC_COMMENT ('/**\\u0078*/')\nWHITE_SPACE (' ')"); doTest("/*", "C_STYLE_COMMENT ('/*')"); doTest("/\\u002a", "C_STYLE_COMMENT ('/\\u002a')"); doTest("/**", "DOC_COMMENT ('/**')"); doTest("/*\\u002a", "DOC_COMMENT ('/*\\u002a')"); doTest("/***", "DOC_COMMENT ('/***')"); doTest("/**\\u002a", "DOC_COMMENT ('/**\\u002a')"); doTest("#! ", "END_OF_LINE_COMMENT ('#! ')"); doTest("\\u0023! ", "BAD_CHARACTER ('\\')\nIDENTIFIER ('u0023')\nEXCL ('!')\nWHITE_SPACE (' ')"); doTest("/", "DIV ('/')"); doTest("1/2", "INTEGER_LITERAL ('1')\nDIV ('/')\nINTEGER_LITERAL ('2')"); doTest("//\\\\u000A test", "END_OF_LINE_COMMENT ('//\\\\u000A test')"); // escaped backslash, not a unicode escape doTest("//\\\\\\u000A test", "END_OF_LINE_COMMENT ('//\\\\')\nWHITE_SPACE ('\\u000A ')\nIDENTIFIER ('test')"); // escaped backslash, followed by a unicode escape }