mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
RegExp: options can be member of branch (IDEA-190180)
This commit is contained in:
@@ -45,7 +45,7 @@ public interface RegExpElementTypes {
|
||||
IElementType NUMBER = new RegExpElementType("NUMBER");
|
||||
|
||||
TokenSet ATOMS = TokenSet.create(CLOSURE, BOUNDARY, SIMPLE_CLASS, CLASS, CHAR, GROUP, PROPERTY, BACKREF, NAMED_GROUP_REF,
|
||||
PY_COND_REF, NAMED_CHARACTER);
|
||||
PY_COND_REF, NAMED_CHARACTER, SET_OPTIONS);
|
||||
|
||||
TokenSet CLASS_ELEMENTS = TokenSet.create(CHAR, CHAR_RANGE, SIMPLE_CLASS, CLASS, INTERSECTION, PROPERTY);
|
||||
}
|
||||
|
||||
+4
@@ -32,6 +32,10 @@ public class SingleCharAlternationInspectionTest extends RegExpInspectionTestCas
|
||||
highlightTest("a|b|cc|d");
|
||||
}
|
||||
|
||||
public void testNoWarnNoException() {
|
||||
highlightTest("(?i)x|y");
|
||||
}
|
||||
|
||||
public void testQuickfix() {
|
||||
quickfixTest("<warning descr=\"Single character alternation in RegExp\">x|y|z</warning>", "[xyz]", "Replace with '[xyz]'");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user