Improve statement recovery in AST generated by ASTParser when there's a lambda - #4603
Improve statement recovery in AST generated by ASTParser when there's a lambda#4603datho7561 wants to merge 1 commit into
Conversation
|
It should recover |
4d00832 to
2f8d482
Compare
8043c1a to
51a3e29
Compare
|
I'm trying to remember if the error in Jenkins secretly means I've caused too many test errors for Jenkins to process or perhaps one of the test failures has a really long result string, but I'm not really sure. I usually see this error when Jenkins isn't functioning correctly. |
|
Tests are failing (locally) because using this aggressive statement recovery gets rid of some of the compiler errors somehow (eg. missing |
51a3e29 to
47d916c
Compare
|
Please request reviews from @srikanth-sankaran and myself when you have a fix without regressions. TIA. (This is any area we're planning to improve soonish, and hence would like to weigh in, before committing to any new strategy). |
Also, recover expressions as an expression statement.
i.e. when there is this source in a method:
```java
{
...
"String".var
...
...
}
```
jdt.ui expects it to be recovered like this:
```java
{
...
"String".var = $missing$;
...
```
Where `$missing$` is a fake, empty identifier.
Currently, in some cases, the `"String".var` is being completely
discarded, and this should improve that.
Related to eclipse-jdt#4530
Signed-off-by: David Thompson <davthomp@redhat.com>
47d916c to
6530ac3
Compare
What it does
Fixes #4530.
Recover statements in method bodies with syntax errors when parsing using
ASTParser.Also recover expressions as expression statements.
How to test
I've added unit tests.
Author checklist