-
Notifications
You must be signed in to change notification settings - Fork 141
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
Comments
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`.
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`.
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). |
Exciting, you're killing it @jalil-salame ! |
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`.
Changes from
Build 4075
hidden_file_extensions
version: 2
extends
meta_prepend
meta_append
pop: 2
etc.Documentation
https://www.sublimetext.com/docs/syntax.html#ver-dev
The text was updated successfully, but these errors were encountered: