Skip to content

Move parser information to tree-sitter.json #79

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

Merged
merged 3 commits into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions package-lock.json

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

18 changes: 5 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,13 @@
"url": "https://github.com/elixir-lang/tree-sitter-elixir.git"
},
"scripts": {
"build": "tree-sitter generate --no-bindings",
"build": "tree-sitter generate",
"test": "tree-sitter test",
"format": "prettier --trailing-comma es5 --write grammar.js && clang-format -i src/scanner.c",
"format-check": "prettier --trailing-comma es5 --check grammar.js && cat src/scanner.c | clang-format src/scanner.c | diff src/scanner.c -",
"install": "node-gyp-build",
"prebuildify": "prebuildify --napi --strip"
"prestart": "tree-sitter build --wasm",
"start": "tree-sitter playground"
},
"dependencies": {
"node-addon-api": "^7.1.0",
Expand All @@ -38,19 +39,10 @@
"devDependencies": {
"clang-format": "^1.8.0",
"prettier": "^2.3.2",
"tree-sitter-cli": "^0.23.0",
"tree-sitter-cli": "^0.24.0",
"prebuildify": "^6.0.0"
},
"peerDependencies": {
"tree-sitter": "^0.21.0"
},
"tree-sitter": [
{
"scope": "source.elixir",
"file-types": ["ex", "exs"],
"highlights": ["queries/highlights.scm"],
"tags": ["queries/tags.scm"],
"injection-regex": "^(ex|elixir)$"
}
]
}
}
40 changes: 40 additions & 0 deletions tree-sitter.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"grammars": [
{
"name": "elixir",
"camelcase": "Elixir",
"scope": "source.elixir",
"path": ".",
"file-types": ["ex", "exs"],
"highlights": "queries/highlights.scm",
"tags": "queries/tags.scm",
"injection-regex": "^(ex|elixir)$"
}
],
"metadata": {
"version": "0.3.2",
"license": "Apache-2.0",
"description": "Elixir grammar for the tree-sitter parsing library",
"authors": [
{
"name": "Jonatan Kłosko",
"email": "[email protected]"
},
{
"name": "Michael Davis",
"email": "[email protected]"
}
],
"links": {
"repository": "https://github.com/elixir-lang/tree-sitter-elixir"
}
},
"bindings": {
"c": true,
"go": true,
"node": true,
"python": true,
"rust": true,
"swift": true
}
}
Loading