Skip to content
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

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

@Ingramz Ingramz Mar 5, 2020

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

@roblourens roblourens Mar 5, 2020

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

@roblourens roblourens Mar 5, 2020

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

@Ingramz Ingramz Mar 5, 2020

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 darangi commented Mar 26, 2020

Thanks for the contribution!

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

Successfully merging this pull request may close these issues.

None yet

4 participants