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/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
+ }
@@ -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
+ )