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 support for PHP 8.0 features #88

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
support native "mixed" type
  • Loading branch information
miken32 authored Nov 24, 2020
commit 53c788b038794f052dc6a828534313abbcdb0ecb
22 changes: 11 additions & 11 deletions Syntaxes/PHP.plist
Original file line number Diff line number Diff line change
Expand Up @@ -547,17 +547,17 @@
<dict>
<key>begin</key>
<string>(?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+
)?
(?:(&amp;)\s*)? # Reference
((\$+)[a-z_\x{7f}-\x{ff}][a-z0-9_\x{7f}-\x{ff}]*) # Variable name
(?:(&amp;)\s*)? # Reference
((\$+)[a-z_\x{7f}-\x{ff}][a-z0-9_\x{7f}-\x{ff}]*) # Variable name
</string>
<key>beginCaptures</key>
<dict>
Expand Down Expand Up @@ -1920,15 +1920,15 @@
<string>meta.function.arguments.php</string>
<key>end</key>
<string>(?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
| ([a-z_0-9\\]*[a-z_][a-z_0-9]*) # qualified-name
)
)?
</string>
Expand Down Expand Up @@ -2138,7 +2138,7 @@
</dict>
<dict>
<key>match</key>
<string>(?i)\b(array|real|double|float|int(eger)?|bool(ean)?|string|class|clone|var|function|interface|parent|self|object)\b</string>
<string>(?i)\b(array|real|double|float|int(eger)?|bool(ean)?|string|mixed|class|clone|var|function|interface|parent|self|object)\b</string>
<key>name</key>
<string>storage.type.php</string>
</dict>
Expand Down