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

[SQL] Resolve merge commits #16

Merged
merged 5 commits into from
May 21, 2022
Merged

[SQL] Resolve merge commits #16

merged 5 commits into from
May 21, 2022

Conversation

deathaxe
Copy link

No description provided.

BenjaminSchaaf and others added 4 commits May 19, 2022 14:06
* [D] Fix ternary operators

Fixes sublimehq#3192

* [D] Use meta.function-call.template.d for template instantiations

Fixes sublimehq#3153

* [D] Allow variable definitions inside conditionals

Fixes sublimehq#3387

* [D] Fix variadic constructor arguments

Fixes sublimehq#3388

Co-authored-by: Benjamin Schaaf <bschaaf@sublimetext.com>
This commit...

1. prevents attribute-completions within attribute values
   (aka. strings)

    <div attrib="|">   <- don't suggest attribute names

2. prevents abbreviation expansion within tags

    <div | >  <- don't expand `tag.attrib`
[PHP] Refactor Syntax

Fixes sublimehq#625
Fixes sublimehq#643
Fixes sublimehq#1168
Fixes sublimehq#1665
Fixes sublimehq#2459
Fixes sublimehq#2625
Fixes sublimehq#3214
Fixes sublimehq#3375

Close sublimehq#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: sublimehq#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%)
@keith-hall keith-hall merged commit 548752d into forkeith:sql May 21, 2022
@deathaxe deathaxe deleted the sql branch May 21, 2022 13:43
@keith-hall
Copy link

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants