mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
a bit more efficiency
This commit is contained in:
+4
-2
@@ -229,7 +229,6 @@ public class TypeDefinition implements GroovyElementTypes {
|
||||
}
|
||||
|
||||
public static boolean parseClassBody(PsiBuilder builder, String className, GroovyParser parser) {
|
||||
//see also InterfaceBlock, EnumBlock, AnnotationBlock
|
||||
//allow errors
|
||||
PsiBuilder.Marker cbMarker = builder.mark();
|
||||
|
||||
@@ -246,7 +245,10 @@ public class TypeDefinition implements GroovyElementTypes {
|
||||
builder.getTokenType();
|
||||
builder.advanceLexer();
|
||||
}
|
||||
if (!(Separators.parse(builder) || ParserUtils.lookAhead(builder, mRCURLY))) {
|
||||
if (builder.getTokenType() == mRCURLY) {
|
||||
break;
|
||||
}
|
||||
if (!Separators.parse(builder)) {
|
||||
builder.error(GroovyBundle.message("separator.or.rcurly.expected"));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user