Fix modifier handling of fields
@@ -43,6 +43,7 @@ public class FieldDefinitionParser extends AbstractParser<FieldDefinitionAST> {
FieldDefinitionAST def = new FieldDefinitionAST(lineNo, start, nameAST, descAST);
def.addChild(nameAST);
// Parse access modifiers
+ if (descStart > DEFINE_LEN) {
String modifiersSection = trim.substring(DEFINE_LEN, descStart);
while(!modifiersSection.trim().isEmpty()) {
// Get current modifier
@@ -63,6 +64,7 @@ public class FieldDefinitionParser extends AbstractParser<FieldDefinitionAST> {
else
modifiersSection = modifiersSection.substring(modStr.length()).trim();
}
+ }
def.addChild(descAST);
return def;
} catch(IndexOutOfBoundsException ex) {
