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

Parse class with capitol letter after instanceof correctly #384

Merged
merged 3 commits into from Mar 26, 2020

Conversation

roblourens
Copy link
Contributor

@roblourens roblourens commented Mar 5, 2020

Description of the Change

It looks like the original author of this section did intend to parse the thing after instanceof correctly but only included a-z not A-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

@@ -728,11 +728,11 @@
'name': 'keyword.operator.bitwise.php'
}
{
'begin': '(?i)\\b(instanceof)\\s+(?=[\\\\$a-z_])'
'begin': '(?i)\\b(instanceof)\\s+(?=[\\\\$a-zA-Z_])'
Copy link
Contributor

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.

Copy link
Contributor Author

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...

Copy link
Contributor Author

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

Copy link
Contributor

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.

Ingramz
Ingramz approved these changes Mar 5, 2020
@darangi
Copy link
Contributor

darangi commented Mar 26, 2020

Thanks for the contribution!

@darangi darangi merged commit db5ad4c into atom:master Mar 26, 2020
@roblourens roblourens deleted the roblou/instanceOfClass branch Mar 26, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants