forked from IndianBoy42/tree-sitter-just
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Significant refactoring of grammar (IndianBoy42#45)
This is a large batch of changes that significantly improve output: - Fix string and backtick parsing - Add support for escape sequences - Simplify recipe matching - Fix single varidic parameter handling - Simplify shebang parsing - Add recipe line prefixes - Fix allowing leading `/` for paths - Add more labels everywhere - Update highlighting where needed - Add a lot more highlighting tests - Add script to convert from tree-sitter flavor bindings to nvim - Verify no tests include parsed errors
- Loading branch information
Showing
18 changed files
with
8,222 additions
and
5,119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/usr/bin/env python3 | ||
"""Generate NeoVim queries. | ||
Everything in `queries/` uses tree-sitter syntax, as defined at | ||
<https://tree-sitter.github.io/tree-sitter/syntax-highlighting#theme>. However, NVim | ||
has a slightly different syntax. | ||
This file performs conversions so two sets of files don't need to be maintained. | ||
<https://docs.helix-editor.com/master/themes.html#syntax-highlighting> has a bit better | ||
guide for these parameters than tree-sitter does. | ||
""" | ||
|
||
REPLACEMENTS = [ | ||
("@local.definition", "@definition.variable"), | ||
("@constants.builtin.boolean", "@boolean"), | ||
("@keyword.control.conditional", "@conditional"), | ||
("@variable.parameter", "@parameter"), | ||
("@comment.line", "@comment"), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.