-
Notifications
You must be signed in to change notification settings - Fork 50
syntax highlighting keyword modifier class #629
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: bug-fix-syntax-highlighting-return-statements
Are you sure you want to change the base?
syntax highlighting keyword modifier class #629
Conversation
… interface declaration
TwitchBronBron
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a few suggestions. Also, can you add some unit tests to verify the colorization works in interface declarations, and also that we are not capturing optional as blue in other situations (like function names, parameters, and variables).
| }, | ||
| "interface_field": { | ||
| "begin": "(?i)\\s*\\b([a-z0-9_]+)(?:[\\s\\t]*(as))?", | ||
| "begin": "(?i)\\s*\\b([a-z0-9_]+)(?:[\\s\\t]*(as))", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we might want to add optional in this regex as an additional optional capture group rather than capturing it as its unique named item.
…tax-highlighting-keyword-modifier-class

This PR adds the keyword modifier class for syntax highlighting when the "optional" keyword is used in interface declarations.
Note: There may very well be a separate class that we would like to store this value in instead. if so please LMK and I will make the necessary adjustments.
Before:

After:
