mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-194238 Custom file types comments conflicting
This commit is contained in:
+3
-3
@@ -62,12 +62,12 @@ public final class CustomFileTypeLexer extends AbstractCustomLexer {
|
||||
|
||||
ArrayList<TokenParser> tokenParsers = new ArrayList<>();
|
||||
tokenParsers.add(new WhitespaceParser());
|
||||
if (lineCommentParser != null) {
|
||||
tokenParsers.add(lineCommentParser);
|
||||
}
|
||||
if (multilineCommentParser != null) {
|
||||
tokenParsers.add(multilineCommentParser);
|
||||
}
|
||||
if (lineCommentParser != null) {
|
||||
tokenParsers.add(lineCommentParser);
|
||||
}
|
||||
tokenParsers.add(keywordParser);
|
||||
tokenParsers.add(quotedStringParser);
|
||||
tokenParsers.add(quotedStringParser2);
|
||||
|
||||
+8
@@ -272,6 +272,14 @@ MULTI_LINE_COMMENT ('/* a\\n *bc */')
|
||||
doTest createJavaSyntaxTable(), "//", 'LINE_COMMENT (\'//\')\n'
|
||||
}
|
||||
|
||||
void "test block comment start overrides line comment start"() {
|
||||
def table = new SyntaxTable()
|
||||
table.lineComment = '#'
|
||||
table.startComment = '#{'
|
||||
table.endComment = '}#'
|
||||
doTest table, "#{ \nblock\n #}", 'MULTI_LINE_COMMENT (\'#{ \\nblock\\n #}\')\n'
|
||||
}
|
||||
|
||||
void testEmpty() {
|
||||
doTest createJavaSyntaxTable(), "", ''
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user