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

Add Matchit support for PHP #649

Merged
merged 4 commits into from Jun 12, 2023
Merged

Conversation

myzeiri
Copy link
Contributor

@myzeiri myzeiri commented Jun 12, 2023

This adds the Matchit patterns required for PHP language support. PHP was requested in VIM-2678 and VIM-2937.

The unit test file is long since the language has a lot of patterns, but the motions themselves are straightforward. I made some small refactorings with notes in the earlier commits.

mapOf happens to give us LinkedHashMaps, but we'll use the explicit
constructor since insertion order matters for PatternsTables.
The less than/greater than operators are the only binary expressions in
the JS patterns, so the extra PSI checks are redundant.
Providing a custom tagNamePattern makes it easier to interop with
languages like PHP.
@myzeiri myzeiri marked this pull request as ready for review June 12, 2023 02:11
@AlexPl292
Copy link
Member

Looks great, no doubt this should be merged. Thank you!

@AlexPl292 AlexPl292 merged commit dd49096 into JetBrains:master Jun 12, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants