Filling out the template is required. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion.
All new code requires tests to ensure against regressions
Description of the Change
This PR fixes the issue of scope and highlighting being invalid when space is inserted between @ and annotation name, e.g. @ Annotation as opposed to @Annotation. We basically need to insert \\s* in the correct place. However, I observed that patterns are invalid in a sense that they capture @ as part of annotation name scope.
So I also fixed the scope of annotations so that storage.type.annotation.java does not capture @. They both have parent scope meta.declaration.annotation.java. This makes them similar to @interface.
Requirements
Description of the Change
This PR fixes the issue of scope and highlighting being invalid when space is inserted between
@
and annotation name, e.g.@ Annotation
as opposed to@Annotation
. We basically need to insert\\s*
in the correct place. However, I observed that patterns are invalid in a sense that they capture@
as part of annotation name scope.So I also fixed the scope of annotations so that
storage.type.annotation.java
does not capture@
. They both have parent scopemeta.declaration.annotation.java
. This makes them similar to@interface
.Alternate Designs
None were considered.
Benefits
Fixes issue when using spaces in annotations.
Possible Drawbacks
None
Applicable Issues
Closes #194