Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Fix enums with override methods#175

Merged
sadikovi merged 1 commit intoatom:masterfrom
sadikovi:enum-issue-1
Dec 4, 2018
Merged

Fix enums with override methods#175
sadikovi merged 1 commit intoatom:masterfrom
sadikovi:enum-issue-1

Conversation

@sadikovi
Copy link
Contributor

@sadikovi sadikovi commented Nov 23, 2018

Requirements

  • 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 extends support for enums and adds a pattern to handle enum's constant fields with method overrides. It is allowed to have such fields mixed with the previous two types that we have added.

The fix is fairly simple - adding another pattern to handle the case of enum field starting with { and ending with } similar to inner class. For that reason, I used include: #class-body instead of include: #code.

Alternate Designs

None were considered, since it is fairly simple fix.

Benefits

Fixes enum highlighting for enums with override methods.

Possible Drawbacks

None. It only affects changes for enums.

Applicable Issues

Closes #173

@sadikovi sadikovi requested a review from winstliu November 23, 2018 21:04
@sadikovi
Copy link
Contributor Author

sadikovi commented Dec 2, 2018

ping @50Wliu

@sadikovi
Copy link
Contributor Author

sadikovi commented Dec 4, 2018

I think I am going to merge this PR. It is very low risk (only affects enums) and it is unit tested.

@sadikovi sadikovi merged commit 7c3d0d3 into atom:master Dec 4, 2018
@sadikovi sadikovi deleted the enum-issue-1 branch December 4, 2018 08:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Overrided methods in enum is not highlighted properly

1 participant