diff --git a/Syntaxes/PHP.plist b/Syntaxes/PHP.plist index 45e5525..53c73af 100644 --- a/Syntaxes/PHP.plist +++ b/Syntaxes/PHP.plist @@ -547,17 +547,17 @@ begin (?ix) - (?: # Optional + (?: # Optional (\?)? (?: - (array|bool|float|int|string) # scalar-type - | (callable|iterable) # base-type-declaration + (array|bool|float|int|string|mixed) # scalar-type + | (callable|iterable) # base-type-declaration | ([a-z_0-9\\]*[a-z_][a-z_0-9]*) ) \s+ )? - (?:(&)\s*)? # Reference - ((\$+)[a-z_\x{7f}-\x{ff}][a-z0-9_\x{7f}-\x{ff}]*) # Variable name + (?:(&)\s*)? # Reference + ((\$+)[a-z_\x{7f}-\x{ff}][a-z0-9_\x{7f}-\x{ff}]*) # Variable name beginCaptures @@ -777,7 +777,7 @@ contentName text.html end - ^(\3)\b + ^\s*(\3)\b endCaptures 0 @@ -825,7 +825,7 @@ contentName text.xml end - ^(\3)\b + ^\s*(\3)\b endCaptures 0 @@ -873,7 +873,7 @@ contentName source.sql end - ^(\3)\b + ^\s*(\3)\b endCaptures 0 @@ -921,7 +921,7 @@ contentName source.js end - ^(\3)\b + ^\s*(\3)\b endCaptures 0 @@ -969,7 +969,7 @@ contentName source.json end - ^(\3)\b + ^\s*(\3)\b endCaptures 0 @@ -1017,7 +1017,7 @@ contentName source.css end - ^(\3)\b + ^\s*(\3)\b endCaptures 0 @@ -1065,7 +1065,7 @@ contentName string.regexp.heredoc.php end - ^(\3)\b + ^\s*(\3)\b endCaptures 0 @@ -1184,7 +1184,7 @@ end - ^(\3)\b + ^\s*(\3)\b endCaptures 1 @@ -1683,7 +1683,7 @@ match - \s*\b((break|c(ase|ontinue)|d(e(clare|fault)|ie|o)|e(lse(if)?|nd(declare|for(each)?|if|switch|while)|xit)|for(each)?|if|return|switch|use|while|yield))\b + \s*\b((break|c(ase|ontinue)|d(e(clare|fault)|ie|o)|e(lse(if)?|nd(declare|for(each)?|if|switch|while)|xit)|for(each)?|if|match|return|switch|use|while|yield))\b begin @@ -1720,7 +1720,7 @@ end - ([A-Za-z_][A-Za-z_0-9]*)\s*((\$+)[a-zA-Z_\x{7f}-\x{ff}][a-zA-Z0-9_\x{7f}-\x{ff}]*)\s*\) + ([A-Za-z_][A-Za-z_0-9]*)\s*((\$+)[a-zA-Z_\x{7f}-\x{ff}][a-zA-Z0-9_\x{7f}-\x{ff}]*)?\s*\) endCaptures 1 @@ -1920,15 +1920,16 @@ meta.function.arguments.php end (?ix) - (\)) # Close arguments - (?: # Optional return type + (\)) # Close arguments + (?: # Optional return type \s*(:)\s* (\?)? (?: - (array|bool|float|int|string) # scalar-type - | (callable|iterable) # base-type-declaration + (array|bool|float|int|string|mixed) # scalar-type + | (callable|iterable) # base-type-declaration | (void) - | ([a-z_0-9\\]*[a-z_][a-z_0-9]*) # qualified-name + | (self|parent|static) # late static binding + | ([a-z_0-9\\]*[a-z_][a-z_0-9]*) # qualified-name ) )? @@ -1965,6 +1966,11 @@ storage.type.void.php 7 + + name + storage.type.$7.php + + 8 patterns @@ -2138,7 +2144,7 @@ match - (?i)\b(array|real|double|float|int(eger)?|bool(ean)?|string|class|clone|var|function|interface|parent|self|object)\b + (?i)\b(array|real|double|float|int(eger)?|bool(ean)?|string|mixed|class|clone|var|function|interface|parent|self|object)\b name storage.type.php @@ -2450,7 +2456,7 @@ match - (?x)(->) + (?x)(\??->) (?: ([A-Za-z_][A-Za-z_0-9]*)\s*\( |