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

Support changes to sublime-syntax from Sublime Text Build 4075 #323

Open
jrappen opened this issue Jan 5, 2021 · 3 comments
Open

Support changes to sublime-syntax from Sublime Text Build 4075 #323

jrappen opened this issue Jan 5, 2021 · 3 comments

Comments

@jrappen
Copy link
Contributor

jrappen commented Jan 5, 2021

Changes from Build 4075

  • hidden file extensions
    • hidden_file_extensions
  • sublime-syntax v2
    • version: 2
  • inheritance
    • extends
  • meta patterns:
    • meta_prepend
    • meta_append
  • match patterns:
    • pop multiple contexts via pop: 2 etc.
  • including an external prototype

Documentation

https://www.sublimetext.com/docs/syntax.html#ver-dev

jalil-salame added a commit to jalil-salame/syntect that referenced this issue Apr 29, 2024
This adds support for the `extends` keyword. The implementation is very
hacky right now:

- We now require an optional `base_syntax` when parsing a syntax, if the
  `base_syntax` is not present and we find an `extends` keyword at the
  top level, we error out reporting which syntax file we expected.
- SyntaxSet collects this error and resolves the syntaxes in a loop
  until no more syntaxes can be resolved.
- We don't handle multiple-inheritance (`extends` might be a list).
- We don't re-evaluate the `contexts` as defined in the spec (you can
  override variables and have that affect the context).
- We only handle `extends` for syntaxes added through
  `SyntaxSet::load_from_folder`.
jalil-salame added a commit to jalil-salame/syntect that referenced this issue May 6, 2024
This adds support for the `extends` keyword. The implementation is very
hacky right now:

- We now require an optional `base_syntax` when parsing a syntax, if the
  `base_syntax` is not present and we find an `extends` keyword at the
  top level, we error out reporting which syntax file we expected.
- SyntaxSet collects this error and resolves the syntaxes in a loop
  until no more syntaxes can be resolved.
- We don't handle multiple-inheritance (`extends` might be a list).
- We don't re-evaluate the `contexts` as defined in the spec (you can
  override variables and have that affect the context).
- We only handle `extends` for syntaxes added through
  `SyntaxSet::load_from_folder`.
@stefanobaghino
Copy link

It's quite nice to see some progress happening with #536! Thanks @jalil-salame!

I'm considering helping. Is there other work going on concerning this ticket apart from the aforementioned draft PR?

@jalil-salame
Copy link

It's quite nice to see some progress happening with #536! Thanks @jalil-salame!

I'm considering helping. Is there other work going on concerning this ticket apart from the aforementioned draft PR?

I need to figure out why the tests are failing in #535 (this updates sublime packages to a newer version) before I can open #536 for review. If you check the comments on #535 you'll see where I'm stuck (I also don't have much time so helping hands will be useful).

@Keats
Copy link
Contributor

Keats commented May 9, 2024

Exciting, you're killing it @jalil-salame !

jalil-salame added a commit to jalil-salame/syntect that referenced this issue May 11, 2024
This adds support for the `extends` keyword. The implementation is very
hacky right now:

- We now require an optional `base_syntax` when parsing a syntax, if the
  `base_syntax` is not present and we find an `extends` keyword at the
  top level, we error out reporting which syntax file we expected.
- SyntaxSet collects this error and resolves the syntaxes in a loop
  until no more syntaxes can be resolved.
- We don't handle multiple-inheritance (`extends` might be a list).
- We don't re-evaluate the `contexts` as defined in the spec (you can
  override variables and have that affect the context).
- We only handle `extends` for syntaxes added through
  `SyntaxSet::load_from_folder`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants