Improve statement recovery in AST generated by ASTParser when there's a lambda#4603
Open
datho7561 wants to merge 1 commit intoeclipse-jdt:masterfrom
Open
Improve statement recovery in AST generated by ASTParser when there's a lambda#4603datho7561 wants to merge 1 commit intoeclipse-jdt:masterfrom
datho7561 wants to merge 1 commit intoeclipse-jdt:masterfrom
Conversation
Contributor
Author
|
It should recover |
4d00832 to
2f8d482
Compare
8043c1a to
51a3e29
Compare
Contributor
Author
|
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. |
Contributor
Author
|
Tests are failing (locally) because using this aggressive statement recovery gets rid of some of the compiler errors somehow (eg. missing |
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>
51a3e29 to
47d916c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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