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

Simplify grammar #143

Merged
merged 11 commits into from Nov 7, 2022
Merged

Simplify grammar #143

merged 11 commits into from Nov 7, 2022

Conversation

nkrkv
Copy link
Collaborator

@nkrkv nkrkv commented Nov 5, 2022

  • Remove a bunch of conflicts
  • Generalize and relax module path-based access for many rules
  • Remove superfluous module_nested_path nesting

@aspeddro
Copy link
Collaborator

aspeddro commented Nov 5, 2022

Another simplification that can be made:

There are two rules for extension, $._raw_js_extension and $._raw_ggl_extension. They are used to apply injections highlights but we can do without them.

Example for %re():

(extension_expression
  (extension_identifier) @_name
  (#eq? @_name "re")
  (expression_statement (string ((string_fragment) @regex))))

@nkrkv
Copy link
Collaborator Author

nkrkv commented Nov 6, 2022

Another simplification that can be made

Oh, thank you! I’m going to move this to a separate issue.

@nkrkv nkrkv merged commit a58ada0 into main Nov 7, 2022
@nkrkv nkrkv deleted the refactor-simplify-2v2 branch November 7, 2022 06:45
aspeddro added a commit to aspeddro/tree-sitter-rescript that referenced this pull request Nov 9, 2022
nkrkv added a commit that referenced this pull request Nov 10, 2022
fix break introduced in #143 for `constrain_module`
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.

None yet

2 participants