tree-sitter-zsh 0.31.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +78 -0
- package/binding.gyp +30 -0
- package/bindings/node/binding.cc +20 -0
- package/bindings/node/binding_test.js +9 -0
- package/bindings/node/index.d.ts +28 -0
- package/bindings/node/index.js +11 -0
- package/grammar.js +1904 -0
- package/package.json +54 -0
- package/prebuilds/darwin-arm64/tree-sitter-zsh.node +0 -0
- package/prebuilds/darwin-x64/tree-sitter-zsh.node +0 -0
- package/prebuilds/linux-arm64/tree-sitter-zsh.node +0 -0
- package/prebuilds/linux-x64/tree-sitter-zsh.node +0 -0
- package/prebuilds/win32-arm64/tree-sitter-zsh.node +0 -0
- package/prebuilds/win32-x64/tree-sitter-zsh.node +0 -0
- package/queries/highlights.scm +59 -0
- package/src/grammar.json +11444 -0
- package/src/node-types.json +4386 -0
- package/src/parser.c +929980 -0
- package/src/scanner.c +2416 -0
- package/src/tree_sitter/alloc.h +54 -0
- package/src/tree_sitter/array.h +291 -0
- package/src/tree_sitter/parser.h +286 -0
- package/tree-sitter-zsh.wasm +0 -0
- package/tree-sitter.json +42 -0
package/package.json
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "tree-sitter-zsh",
|
|
3
|
+
"version": "0.31.0",
|
|
4
|
+
"description": "Zsh grammar for tree-sitter",
|
|
5
|
+
"repository": "https://github.com/geohar/tree-sitter-zsh",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"author": {
|
|
8
|
+
"name": "George Harrison",
|
|
9
|
+
"email": "georgeharker@gmail.com"
|
|
10
|
+
},
|
|
11
|
+
"main": "bindings/node",
|
|
12
|
+
"types": "bindings/node",
|
|
13
|
+
"keywords": [
|
|
14
|
+
"incremental",
|
|
15
|
+
"parsing",
|
|
16
|
+
"tree-sitter",
|
|
17
|
+
"zsh"
|
|
18
|
+
],
|
|
19
|
+
"files": [
|
|
20
|
+
"grammar.js",
|
|
21
|
+
"tree-sitter.json",
|
|
22
|
+
"binding.gyp",
|
|
23
|
+
"prebuilds/**",
|
|
24
|
+
"bindings/node/*",
|
|
25
|
+
"queries/*",
|
|
26
|
+
"src/**",
|
|
27
|
+
"*.wasm"
|
|
28
|
+
],
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"node-addon-api": "^8.2.1",
|
|
31
|
+
"node-gyp-build": "^4.8.2"
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"eslint": "^9.12.0",
|
|
35
|
+
"eslint-config-treesitter": "^1.0.2",
|
|
36
|
+
"prebuildify": "^6.0.1",
|
|
37
|
+
"tree-sitter-cli": "^0.25.6"
|
|
38
|
+
},
|
|
39
|
+
"peerDependencies": {
|
|
40
|
+
"tree-sitter": "^0.25.0"
|
|
41
|
+
},
|
|
42
|
+
"peerDependenciesMeta": {
|
|
43
|
+
"tree-sitter": {
|
|
44
|
+
"optional": true
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"scripts": {
|
|
48
|
+
"install": "node-gyp-build",
|
|
49
|
+
"lint": "eslint grammar.js",
|
|
50
|
+
"prestart": "tree-sitter build --wasm",
|
|
51
|
+
"start": "tree-sitter playground",
|
|
52
|
+
"test": "node --test bindings/node/*_test.js"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
[
|
|
2
|
+
(string)
|
|
3
|
+
(raw_string)
|
|
4
|
+
(heredoc_body)
|
|
5
|
+
(heredoc_start)
|
|
6
|
+
] @string
|
|
7
|
+
|
|
8
|
+
[
|
|
9
|
+
(command_name)
|
|
10
|
+
(declaration_command)
|
|
11
|
+
]@function
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
(variable_name) @property
|
|
15
|
+
|
|
16
|
+
[
|
|
17
|
+
"case"
|
|
18
|
+
"do"
|
|
19
|
+
"done"
|
|
20
|
+
"elif"
|
|
21
|
+
"else"
|
|
22
|
+
"esac"
|
|
23
|
+
"export"
|
|
24
|
+
"fi"
|
|
25
|
+
"for"
|
|
26
|
+
"function"
|
|
27
|
+
"if"
|
|
28
|
+
"in"
|
|
29
|
+
"select"
|
|
30
|
+
"then"
|
|
31
|
+
"unset"
|
|
32
|
+
"until"
|
|
33
|
+
"while"
|
|
34
|
+
] @keyword
|
|
35
|
+
|
|
36
|
+
(comment) @comment
|
|
37
|
+
|
|
38
|
+
(function_definition name: (word) @function)
|
|
39
|
+
|
|
40
|
+
(file_descriptor) @number
|
|
41
|
+
|
|
42
|
+
[
|
|
43
|
+
(command_substitution)
|
|
44
|
+
(process_substitution)
|
|
45
|
+
(expansion)
|
|
46
|
+
]@embedded
|
|
47
|
+
|
|
48
|
+
[
|
|
49
|
+
"&&"
|
|
50
|
+
">"
|
|
51
|
+
">>"
|
|
52
|
+
"<"
|
|
53
|
+
"|"
|
|
54
|
+
] @operator
|
|
55
|
+
|
|
56
|
+
(
|
|
57
|
+
(command (_) @constant)
|
|
58
|
+
(#match? @constant "^-")
|
|
59
|
+
)
|