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
Parse class with capitol letter after instanceof correctly #384
Conversation
682fdad
to
be86fff
Compare
grammars/php.cson
Outdated
@@ -728,11 +728,11 @@ | |||
'name': 'keyword.operator.bitwise.php' | |||
} | |||
{ | |||
'begin': '(?i)\\b(instanceof)\\s+(?=[\\\\$a-z_])' | |||
'begin': '(?i)\\b(instanceof)\\s+(?=[\\\\$a-zA-Z_])' |
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.
Modifier in front is already marks this expression case insensitive, so this change should not be needed.
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 does fix the issue though, hm...
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.
Oh, only the second line is needed
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.
Yeah, I realized that it could be read like that, sorry about that.
Thanks for the contribution! |
Description of the Change
It looks like the original author of this section did intend to parse the thing after
instanceof
correctly but only includeda-z
notA-Za-z
. You can see that this does work as expected with class names starting with a lowercase letter.Benefits
Show correct coloring for the class name
Possible Drawbacks
I think this is fairly straightforward
Applicable Issues
#225
microsoft/vscode#88441