From 1c9a94bd60b7a662a2d36a1bb753f26946f4cda4 Mon Sep 17 00:00:00 2001 From: Caleb White Date: Mon, 18 Mar 2024 22:09:53 -0500 Subject: fix(php): add missing keyword highlights, fix static keyword --- queries/php_only/highlights.scm | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'queries/php_only') diff --git a/queries/php_only/highlights.scm b/queries/php_only/highlights.scm index 0bba534d0..ab95ea603 100644 --- a/queries/php_only/highlights.scm +++ b/queries/php_only/highlights.scm @@ -26,6 +26,9 @@ (name) @type) ]) +(named_type (name) @type.builtin + (#any-of? @type.builtin "static" "self")) + (class_declaration name: (name) @type) @@ -96,6 +99,8 @@ (list_literal "list" @function.builtin) +(exit_statement "exit" @function.builtin "(") + (method_declaration name: (name) @function.method) @@ -216,7 +221,6 @@ (named_label_statement) @label - ; Keywords [ "and" @@ -246,6 +250,7 @@ "implements" "insteadof" "interface" + "print" "namespace" "new" "trait" @@ -260,14 +265,22 @@ "protected" "public" "readonly" - "static" + (static_modifier) ] @keyword.modifier +(function_static_declaration + "static" @keyword.modifier) + [ "return" + "exit" "yield" ] @keyword.return +(yield_expression + "from" @keyword.return) + + [ "case" "else" -- cgit v1.2.3-70-g09d2