mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 15:19:59 +07:00
Java: remove conditional lexing (lex string templates in lower language levels)
GitOrigin-RevId: f10cdb96bbd89b6a70fb9dac6bc83ce7e29c1a83
This commit is contained in:
committed by
intellij-monorepo-bot
parent
904e0aad5a
commit
d9047d7a2b
@@ -253,11 +253,10 @@ public abstract class AbstractBasicJavaLexerTest extends LexerTestCase {
|
||||
doTest("\"\"\" \n\"\"\" ", "TEXT_BLOCK_LITERAL ('\"\"\" \\n\"\"\"')\nWHITE_SPACE (' ')");
|
||||
doTest("\"\"\"\n \\u005C\"\"\"\n \"\"\"", "TEXT_BLOCK_LITERAL ('\"\"\"\\n \\u005C\"\"\"\\n \"\"\"')"); // unicode escaped backslash '\'
|
||||
|
||||
doTest("\"\"\"\n\\{}\"\"\"", "TEXT_BLOCK_LITERAL ('\"\"\"\\n\\{}\"\"\"')");
|
||||
doTest("\"\"\"\n ...\n\"\" \"\"\" ", "TEXT_BLOCK_LITERAL ('\"\"\"\\n ...\\n\"\" \"\"\"')\nWHITE_SPACE (' ')");
|
||||
}
|
||||
|
||||
public void testStringTemplatesJDK21_Preview() {
|
||||
public void testStringTemplates() {
|
||||
doTest("\"\\{}\"", "STRING_TEMPLATE_BEGIN ('\"\\{')\nSTRING_TEMPLATE_END ('}\"')");
|
||||
doTest("\"\"\"\n\\{}\"\"\"", "TEXT_BLOCK_TEMPLATE_BEGIN ('\"\"\"\\n\\{')\nTEXT_BLOCK_TEMPLATE_END ('}\"\"\"')");
|
||||
doTest("\"\\{123}\"", "STRING_TEMPLATE_BEGIN ('\"\\{')\nINTEGER_LITERAL ('123')\nSTRING_TEMPLATE_END ('}\"')");
|
||||
@@ -429,8 +428,6 @@ public abstract class AbstractBasicJavaLexerTest extends LexerTestCase {
|
||||
|
||||
// see also com.intellij.java.codeInsight.daemon.LightAdvHighlightingTest#testStringLiterals
|
||||
doTest(" \"\\u000a\" ", "WHITE_SPACE (' ')\nSTRING_LITERAL ('\"\\u000a\"')\nWHITE_SPACE (' ')");
|
||||
|
||||
doTest("\"\\{}\"", "STRING_LITERAL ('\"\\{}\"')");
|
||||
}
|
||||
|
||||
public void testCharLiterals() {
|
||||
|
||||
Reference in New Issue
Block a user