void () { final RegExpLexer lexer = new RegExpLexer(EnumSet.of(EXTENDED_UNICODE_CHARACTER)); doTest("\\u{1F680}\\x{1F680}\\u{}\\u{1}\\u{FF}\\x{fff}\\u1234\\u123\\u", """ UNICODE_CHAR ('\\u{1F680}') HEX_CHAR ('\\x{1F680}') INVALID_UNICODE_ESCAPE_TOKEN ('\\u{}') UNICODE_CHAR ('\\u{1}') UNICODE_CHAR ('\\u{FF}') HEX_CHAR ('\\x{fff}') UNICODE_CHAR ('\\u1234') INVALID_UNICODE_ESCAPE_TOKEN ('\\u') CHARACTER ('1') CHARACTER ('2') CHARACTER ('3') INVALID_UNICODE_ESCAPE_TOKEN ('\\u')""", lexer); final RegExpLexer lexer2 = new RegExpLexer(EnumSet.of(DANGLING_METACHARACTERS)); doTest("\\u{1F680}", """ INVALID_UNICODE_ESCAPE_TOKEN ('\\u') CHARACTER ('{') CHARACTER ('1') CHARACTER ('F') CHARACTER ('6') CHARACTER ('8') CHARACTER ('0') CHARACTER ('}')""", lexer2); }