From 50ce1902037ef63f2e9a774f3ff0967d424b4d18 Mon Sep 17 00:00:00 2001 From: KapitanOczywisty <44417092+KapitanOczywisty@users.noreply.github.com> Date: Thu, 1 Apr 2021 13:35:07 +0200 Subject: [PATCH] Update PHP grammar --- extensions/php/syntaxes/php.tmLanguage.json | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/extensions/php/syntaxes/php.tmLanguage.json b/extensions/php/syntaxes/php.tmLanguage.json index d6341cce2c1..0dcfc8295c9 100644 --- a/extensions/php/syntaxes/php.tmLanguage.json +++ b/extensions/php/syntaxes/php.tmLanguage.json @@ -4,7 +4,7 @@ "If you want to provide a fix or improvement, please create a pull request against the original repository.", "Once accepted there, we are happy to receive an update request." ], - "version": "https://github.com/atom/language-php/commit/72739e6341b1b4bf4aa185e928932983baca449e", + "version": "https://github.com/atom/language-php/commit/5fae657cf989701e9594912772daff33249839b3", "scopeName": "source.php", "patterns": [ { @@ -750,7 +750,7 @@ ] }, { - "match": "(?xi)\n((?:(?:public|private|protected|static)(?:\\s+|(?=\\?)))+) # At least one modifier\n(\n (?:\\?\\s*)? [a-z0-9_\\x{7f}-\\x{7fffffff}\\\\]+ | # nullable type\n [a-z0-9_\\x{7f}-\\x{7fffffff}\\\\]+ (?: \\s*\\|\\s* [a-z0-9_\\x{7f}-\\x{7fffffff}\\\\]+)+ # union type\n)?\n\\s+ ((\\$)[a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*) # Variable name", + "match": "(?xi)\n((?:(?:public|private|protected|static)(?:\\s+|(?=\\?)))++) # At least one modifier\n(\n (?:\\?\\s*)? [a-z0-9_\\x{7f}-\\x{7fffffff}\\\\]+ | # nullable type\n [a-z0-9_\\x{7f}-\\x{7fffffff}\\\\]+ (?: \\s*\\|\\s* [a-z0-9_\\x{7f}-\\x{7fffffff}\\\\]+)+ # union type\n)?\n\\s+ ((\\$)[a-z_\\x{7f}-\\x{7fffffff}][a-z0-9_\\x{7f}-\\x{7fffffff}]*) # Variable name", "captures": { "1": { "patterns": [ @@ -1304,6 +1304,9 @@ }, "function-parameters": { "patterns": [ + { + "include": "#attribute" + }, { "include": "#comments" }, @@ -3682,4 +3685,4 @@ "name": "keyword.operator.null-coalescing.php" } } -} \ No newline at end of file +}