grammars-v4 icon indicating copy to clipboard operation
grammars-v4 copied to clipboard

Java: record in classes are identified as methods

Open eldad-vfunction opened this issue 3 years ago • 0 comments

Consider the code:

public class A {
    record R1(int x) {
    }
}

It seems that R1 is identified as method instead of record.

To fix it, I modified memberDeclaration in JavaParser.g4 so recordDeclaration will be before methodDeclaration.

eldad-vfunction avatar Jun 26 '22 09:06 eldad-vfunction