-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Fix php hightlight #3317
Fix php hightlight #3317
Conversation
namespace fucntion
runtime/queries/php/highlights.scm
Outdated
(subscript_expression | ||
(variable_name(name) @constant.builtin) | ||
) |
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.
for code like
$array = ['One', 'Two', 'Three'];
echo $array[0]; // => "One"
This now highlights arrays
in L2 as constant.builtin
but I think the variable
capture from before was more accurate
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.
(subscript_expression
(variable_name(name) @constant.builtin
(#match? @constant.builtin "^_?[A-Z][A-Z\\d_]+$")))
it‘s seem ok
Co-authored-by: Michael Davis <[email protected]>
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.
Looks great, thanks!
Co-authored-by: Michael Davis <[email protected]>
namespace
fucntion