Skip to content

Commit

Permalink
Generate parser with Tree-sitter 0.24.1
Browse files Browse the repository at this point in the history
  • Loading branch information
nwhetsell committed Oct 5, 2024
1 parent 1e60723 commit 7413e05
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 25 deletions.
23 changes: 3 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,29 +37,12 @@
},
"devDependencies": {
"prebuildify": "^6.0.0",
"tree-sitter-cli": "^0.23.2"
"tree-sitter-cli": "^0.24.1"
},
"scripts": {
"install": "node-gyp-build",
"prestart": "tree-sitter build --wasm",
"start": "tree-sitter playground",
"test": "node --test bindings/node/*_test.js"
},
"tree-sitter": [
{
"scope": "source.lilypond",
"file-types": [
"ily",
"ly"
],
"highlights": [
"queries/highlights.scm",
"queries/highlights-builtins.scm",
"tree-sitter-lilypond-scheme/queries/highlights.scm",
"tree-sitter-lilypond-scheme/queries/highlights-builtins.scm",
"tree-sitter-lilypond-scheme/queries/highlights-lilypond-builtins.scm"
],
"injection-regex": "^l(?:ilypond|y)$"
}
]
}
}
}
1 change: 1 addition & 0 deletions src/grammar.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/node-types.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions src/tree_sitter/alloc.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

45 changes: 45 additions & 0 deletions tree-sitter.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"grammars": [
{
"name": "lilypond",
"camelcase": "LilyPond",
"scope": "source.lilypond",
"path": ".",
"file-types": [
"ily",
"ly"
],
"highlights": [
"queries/highlights.scm",
"queries/highlights-builtins.scm",
"tree-sitter-lilypond-scheme/queries/highlights.scm",
"tree-sitter-lilypond-scheme/queries/highlights-builtins.scm",
"tree-sitter-lilypond-scheme/queries/highlights-lilypond-builtins.scm"
],
"injection-regex": "^l(?:ilypond|y)$"
}
],
"metadata": {
"version": "0.0.0",
"license": "MIT",
"description": "LilyPond grammar for Tree-sitter",
"authors": [
{
"name": "Nathan Whetsell",
"email": "nathan.whetsell@gmail.com"
}
],
"links": {
"repository": "https://github.com/nwhetsell/tree-sitter-lilypond.git",
"homepage": "https://github.com/nwhetsell/tree-sitter-lilypond"
}
},
"bindings": {
"c": true,
"go": true,
"node": true,
"python": true,
"rust": true,
"swift": true
}
}
2 changes: 1 addition & 1 deletion queries/update_builtins.py → update_builtins.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
for keyword in ['markup', 'markuplist', 'override', 'score']:
_lilypond_builtins.markup_commands.remove(keyword)

with open('highlights-builtins.scm', 'w') as file:
with open('queries/highlights-builtins.scm', 'w') as file:
backslash_prefix = r'^\\\\'
for list_and_selector in [
(_lilypond_builtins.keywords, 'keyword'),
Expand Down

0 comments on commit 7413e05

Please sign in to comment.