New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JavaParser finds "." in place of first element after a yeild statement. #4400
Comments
Can you provide us with a unit test? |
Would the code being parsed suffice? I don't really know how to setup a unit test for this |
|
The program is using the latest version of JavaParser available on maven-central (3.25.10) |
Thank you. Can you show us how you configure the parser. |
|
I get no exceptions when I parse your class with this code snippet.
|
Very weird, it seems to work standalone for me too.... |
nevermind, result.isSuccessful() is not true |
JavaParser javaParser = new JavaParser();
javaParser.getParserConfiguration().setLanguageLevel(ParserConfiguration.LanguageLevel.RAW);
ParseResult<CompilationUnit> result = javaParser.parse(code);
if (!result.isSuccessful()) {
for (Problem problem : result.getProblems()) {
System.out.println(problem.getMessage());
}
}
|
Your test case can be reduced to the following. There seem to be 2 problems:
|
Line 98:
yield rIHCHOIOCIOICHHRHHIOHIHIC.OOICCOCOCRHCOCIORIHHIHHHH("user", "publicServerGame", var4_6, var2_3);
Column 31 (whitespace ommited):
yield rIHCHOIOCIOICHHRHHIOHIHIC.OOICCOCOCRHCOCIORIHHIHHHH("user", "publicServerGame", var4_6, var2_3);
^
Evidently there is no "." written at column 31
The text was updated successfully, but these errors were encountered: