-
Notifications
You must be signed in to change notification settings - Fork 588
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
[PHP] closure scope does not cover body #2625
Comments
kapitanluffy
changed the title
[PHP] closure syntax does not cover body
[PHP] closure scope does not cover body
Nov 16, 2020
Merged
deathaxe
added a commit
that referenced
this issue
May 21, 2022
[PHP] Refactor Syntax Fixes #625 Fixes #643 Fixes #1168 Fixes #1665 Fixes #2459 Fixes #2625 Fixes #3214 Fixes #3375 Close #2789 This commit refactors PHP to... 1. solve known issues, such as huge syntax cache and compile times 2. improve maintainability and readability 3. apply some design patterns with regards to scope naming or syntax architecture Major Changes ============= - converts most contexts to named contexts - for readability reasons - to improve re-usability of contexts - to improve inheritance support - organizes all rules into - declarations (classes, functions, ...) - statements (if, else, while, ...) - expressions (arithmetic, function-calls, ...) - replaces (nearly) all `push ... with_prototype` constructs - to significantly reduce syntax cache size - gain more control over string interpolation scenarios `meta.string meta.interpolation` - significantly reduce risk of exceeding context sanity limit (see: #1665) - applies scope changes to more closely follow recently discussed scope naming - upgrades all parts to sublime-syntax version 2 - improves highlighting of incomplete statements and expressions - improve support for syntax based folding (as good as possible with regards to mixing HTML/CSS/JS with PHP) Benchmarks ========== Attribute | ST4131 | this PR | Diff --------------------------------------------------+----------+---------+-------------------- Syntax Cache Size | 38.050kB | 7.481kB | -30.569kB (-80%) Syntax Compile Time | 2,8s | 0,6s | -2,2ms (-78,6%) Syntax Test -- Performance [syntax_test_php.php] | 11,2ms | 7,9ms | -3.3ms (-29%) Syntax Test -- Performance [PHPUnit/composer.php] | 557ms | 376ms | -181ms (-32%)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I was reviewing the syntax highlighting for PHP and noticed that the meta_scope
meta.function.closure.php
ends beforeuse
as shown below. Shouldn't it scope all the closure's body similar tometa.function.php
?The text was updated successfully, but these errors were encountered: