mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
New Java parser (enum parsing fixed)
This commit is contained in:
@@ -107,6 +107,7 @@ public class DeclarationParser {
|
||||
if (!expect(builder, JavaTokenType.COMMA)) {
|
||||
if (builder.getTokenType() != null && builder.getTokenType() != JavaTokenType.SEMICOLON) {
|
||||
error(builder, JavaErrorMessages.message("expected.comma.or.semicolon"));
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -61,7 +61,7 @@ public class DeclarationParserTest extends JavaParsingTestCase {
|
||||
public void testEnumBody3() { doParserTest("{ RED, GREEN, BLUE, }", false, true); }
|
||||
public void testEnumBody4() { doParserTest("{ RED(0), GREEN(1), BLUE(2); }", false, true); }
|
||||
public void testEnumBody5() { doParserTest("{ @ANNOTATION A(10) }", false, true); }
|
||||
//public void testEnumBody6() { doParserTest("{ RED, GREEN, BLUE\n OurEnum() {} }", false, true); }
|
||||
public void testEnumBody6() { doParserTest("{ RED, GREEN, BLUE\n OurEnum() {} }", false, true); }
|
||||
public void testEnumWithInitializedConstants() { doParserTest("{ A(10) { },\n B { void method() {} } }", false, true); }
|
||||
public void testEnumWithoutConstants() { doParserTest("{ private A }", false, true); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user