eclipse-jdt / eclipse-jdt/eclipse.jdt.core
missing pieces in the AST: parser seems to skip member value pair name when there is a . at the end
- Dominant language
- Java
- Stars
- 237
- Forks
- 195
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 49
Description
Similar to https://github.com/eclipse-jdt/eclipse.jdt.core/issues/3155, I am working on code completion based on AST nodes and came across this case for a field declaration, as another follow-up from #3156:
```
@Value(value=spring.)
```
results in an AST that looks like:
```
@Value(value.$missing$)
```
It looks like the parser turns this annotation into a `SingleMemberAnnotation` with a `QualifiedName`, where it should keep the usual member value pair structure.
(using `org.eclipse.jdt.core` 3.40.0)
@FYI @mickaelistria and @stephan-herrmann)
Contributor guide
Research direction
Reproduce the annotation example `@Value(value=spring.)` and inspect the resulting AST shape, comparing it with the expected member value pair structure. Start by tracing the parser path for annotations, qualified names, and incomplete expressions; done means the trailing-dot case retains the usual member value pair structure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100