-
Notifications
You must be signed in to change notification settings - Fork 684
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
Syntax highlighting improvements and tests #1014
Syntax highlighting improvements and tests #1014
Conversation
@@ -123,6 +160,43 @@ | |||
} | |||
] | |||
}, | |||
"genericConstraints": { | |||
"begin": "(where)\\s*(\\w+)\\s*:", |
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.
It probably doesn't matter in practice, but shouldn't the \\s*
after (where)
above technically be \\s+
? Otherwise, wouldn't it match whereImCool:
?
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.
Good catch. Fixed.
} | ||
}, | ||
{ | ||
"match": "([\\w<>]+)\\s*(?=,|where|{)", |
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.
Does matching [\\w<>]+
mean that it won't work for generic types with multiple parameters?
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.
You are right. I need to think how to handle this better. Whitespace handling is a pain in the a**. :) Will update the pull request.
e0eb3a0
to
5ca75df
Compare
…d generic constraints.
…d test for generic fields.
I've done some updates and it's now again ready for review. |
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.
much better!
I saw you approved this pull (thanks!), but heads up that I don't have merge permissions, so you will have to merge it when ready 👍 |
Yup. I was waiting to merge when I got into the office. |
Fixes: #757, #960
Class Declaration and Inheritance
Screenshots are from before I made the above changes around generics, but you get the gist.
Before
After
Class Generic Constraints
Before
After
Fields
Before
After