ts-wasms 1.0.2 → 1.0.3

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.
Files changed (99) hide show
  1. package/README.md +33 -0
  2. package/out/bash/tree-sitter-bash.wasm +0 -0
  3. package/out/c/tree-sitter-c.wasm +0 -0
  4. package/out/c-sharp/tree-sitter-c_sharp.wasm +0 -0
  5. package/out/clojure/highlights.scm +29 -0
  6. package/out/clojure/tree-sitter-clojure.wasm +0 -0
  7. package/out/clojurescript/highlights.scm +29 -0
  8. package/out/clojurescript/tree-sitter-clojure.wasm +0 -0
  9. package/out/commonlisp/tags.scm +122 -0
  10. package/out/commonlisp/tree-sitter-commonlisp.wasm +0 -0
  11. package/out/cpp/tree-sitter-cpp.wasm +0 -0
  12. package/out/css/tree-sitter-css.wasm +0 -0
  13. package/out/dart/tree-sitter-dart.wasm +0 -0
  14. package/out/elisp/tree-sitter-elisp.wasm +0 -0
  15. package/out/elixir/tree-sitter-elixir.wasm +0 -0
  16. package/out/elm/highlights.scm +76 -0
  17. package/out/elm/injections.scm +4 -0
  18. package/out/elm/locals.scm +15 -0
  19. package/out/elm/tags.scm +19 -0
  20. package/out/elm/tree-sitter-elm.wasm +0 -0
  21. package/out/embedded-template/tree-sitter-embedded_template.wasm +0 -0
  22. package/out/erlang/highlights.scm +230 -0
  23. package/out/erlang/tree-sitter-erlang.wasm +0 -0
  24. package/out/go/tree-sitter-go.wasm +0 -0
  25. package/out/graphql/tree-sitter-graphql.wasm +0 -0
  26. package/out/haskell/tree-sitter-haskell.wasm +0 -0
  27. package/out/html/tree-sitter-html.wasm +0 -0
  28. package/out/java/tree-sitter-java.wasm +0 -0
  29. package/out/javascript/tree-sitter-javascript.wasm +0 -0
  30. package/out/json/tree-sitter-json.wasm +0 -0
  31. package/out/julia/highlights.scm +375 -0
  32. package/out/julia/injections.scm +42 -0
  33. package/out/julia/locals.scm +71 -0
  34. package/out/julia/tree-sitter-julia.wasm +0 -0
  35. package/out/kotlin/tree-sitter-kotlin.wasm +0 -0
  36. package/out/lua/highlights.scm +201 -0
  37. package/out/lua/injections.scm +12 -0
  38. package/out/lua/locals.scm +32 -0
  39. package/out/lua/tags.scm +36 -0
  40. package/out/lua/tree-sitter-lua.wasm +0 -0
  41. package/out/markdown-tree-sitter-markdown/highlights.scm +52 -0
  42. package/out/markdown-tree-sitter-markdown/injections.scm +12 -0
  43. package/out/markdown-tree-sitter-markdown/tree-sitter-markdown.wasm +0 -0
  44. package/out/markdown-tree-sitter-markdown-inline/highlights.scm +37 -0
  45. package/out/markdown-tree-sitter-markdown-inline/injections.scm +2 -0
  46. package/out/markdown-tree-sitter-markdown-inline/tree-sitter-markdown_inline.wasm +0 -0
  47. package/out/objc/tree-sitter-objc.wasm +0 -0
  48. package/out/php/highlights.scm +203 -0
  49. package/out/php/injections-text.scm +3 -0
  50. package/out/php/injections.scm +10 -0
  51. package/out/php/tags.scm +40 -0
  52. package/out/php/tree-sitter-php.wasm +0 -0
  53. package/out/php-php_only/highlights.scm +203 -0
  54. package/out/php-php_only/injections-text.scm +3 -0
  55. package/out/php-php_only/injections.scm +10 -0
  56. package/out/php-php_only/tags.scm +40 -0
  57. package/out/{php_only → php-php_only}/tree-sitter-php_only.wasm +0 -0
  58. package/out/prisma/highlights.scm +39 -0
  59. package/out/prisma/tree-sitter-prisma.wasm +0 -0
  60. package/out/python/tree-sitter-python.wasm +0 -0
  61. package/out/query/tree-sitter-query.wasm +0 -0
  62. package/out/r/highlights.scm +112 -0
  63. package/out/r/locals.scm +18 -0
  64. package/out/r/tags.scm +21 -0
  65. package/out/r/tree-sitter-r.wasm +0 -0
  66. package/out/racket/highlights.scm +108 -0
  67. package/out/racket/locals.scm +34 -0
  68. package/out/racket/tags.scm +12 -0
  69. package/out/racket/tree-sitter-racket.wasm +0 -0
  70. package/out/regex/tree-sitter-regex.wasm +0 -0
  71. package/out/ruby/tree-sitter-ruby.wasm +0 -0
  72. package/out/rust/tree-sitter-rust.wasm +0 -0
  73. package/out/scala/tree-sitter-scala.wasm +0 -0
  74. package/out/scheme/highlights.scm +84 -0
  75. package/out/scheme/tree-sitter-scheme.wasm +0 -0
  76. package/out/sql/tree-sitter-SQL.wasm +0 -0
  77. package/out/swift/tree-sitter-swift.wasm +0 -0
  78. package/out/toml/highlights.scm +53 -0
  79. package/out/toml/tree-sitter-toml.wasm +0 -0
  80. package/out/typescript/highlights.scm +35 -0
  81. package/out/typescript/locals.scm +2 -0
  82. package/out/typescript/tags.scm +23 -0
  83. package/out/typescript/tree-sitter-typescript.wasm +0 -0
  84. package/out/typescript-tsx/highlights.scm +35 -0
  85. package/out/typescript-tsx/locals.scm +2 -0
  86. package/out/typescript-tsx/tags.scm +23 -0
  87. package/out/{tsx → typescript-tsx}/tree-sitter-tsx.wasm +0 -0
  88. package/out/vimdoc/tree-sitter-vimdoc.wasm +0 -0
  89. package/out/vue/tree-sitter-vue.wasm +0 -0
  90. package/out/xml/tree-sitter-xml.wasm +0 -0
  91. package/out/xml-dtd/tree-sitter-dtd.wasm +0 -0
  92. package/out/yaml/tree-sitter-yaml.wasm +0 -0
  93. package/out/zig/folds.scm +23 -0
  94. package/out/zig/highlights.scm +291 -0
  95. package/out/zig/indents.scm +22 -0
  96. package/out/zig/injections.scm +10 -0
  97. package/out/zig/tree-sitter-zig.wasm +0 -0
  98. package/package.json +76 -63
  99. package/README +0 -2
@@ -0,0 +1,35 @@
1
+ ; Types
2
+
3
+ (type_identifier) @type
4
+ (predefined_type) @type.builtin
5
+
6
+ ((identifier) @type
7
+ (#match? @type "^[A-Z]"))
8
+
9
+ (type_arguments
10
+ "<" @punctuation.bracket
11
+ ">" @punctuation.bracket)
12
+
13
+ ; Variables
14
+
15
+ (required_parameter (identifier) @variable.parameter)
16
+ (optional_parameter (identifier) @variable.parameter)
17
+
18
+ ; Keywords
19
+
20
+ [ "abstract"
21
+ "declare"
22
+ "enum"
23
+ "export"
24
+ "implements"
25
+ "interface"
26
+ "keyof"
27
+ "namespace"
28
+ "private"
29
+ "protected"
30
+ "public"
31
+ "type"
32
+ "readonly"
33
+ "override"
34
+ "satisfies"
35
+ ] @keyword
@@ -0,0 +1,2 @@
1
+ (required_parameter (identifier) @local.definition)
2
+ (optional_parameter (identifier) @local.definition)
@@ -0,0 +1,23 @@
1
+ (function_signature
2
+ name: (identifier) @name) @definition.function
3
+
4
+ (method_signature
5
+ name: (property_identifier) @name) @definition.method
6
+
7
+ (abstract_method_signature
8
+ name: (property_identifier) @name) @definition.method
9
+
10
+ (abstract_class_declaration
11
+ name: (type_identifier) @name) @definition.class
12
+
13
+ (module
14
+ name: (identifier) @name) @definition.module
15
+
16
+ (interface_declaration
17
+ name: (type_identifier) @name) @definition.interface
18
+
19
+ (type_annotation
20
+ (type_identifier) @name) @reference.type
21
+
22
+ (new_expression
23
+ constructor: (identifier) @name) @reference.class
File without changes
File without changes
Binary file
Binary file
Binary file
@@ -0,0 +1,23 @@
1
+ [
2
+ (block)
3
+ (switch_expression)
4
+ (initializer_list)
5
+ (asm_expression)
6
+ (multiline_string)
7
+ (if_statement)
8
+ (while_statement)
9
+ (for_statement)
10
+ (if_expression)
11
+ (else_clause)
12
+ (for_expression)
13
+ (while_expression)
14
+ (if_type_expression)
15
+ (function_signature)
16
+ (parameters)
17
+ (struct_declaration)
18
+ (opaque_declaration)
19
+ (enum_declaration)
20
+ (union_declaration)
21
+ (error_set_declaration)
22
+ ] @fold
23
+
@@ -0,0 +1,291 @@
1
+ ; Variables
2
+
3
+ (identifier) @variable
4
+
5
+ ; Parameters
6
+
7
+ (parameter
8
+ name: (identifier) @variable.parameter)
9
+
10
+ ; Types
11
+
12
+ (parameter
13
+ type: (identifier) @type)
14
+
15
+ ((identifier) @type
16
+ (#lua-match? @type "^[A-Z_][a-zA-Z0-9_]*"))
17
+
18
+ (variable_declaration
19
+ (identifier) @type
20
+ "="
21
+ [
22
+ (struct_declaration)
23
+ (enum_declaration)
24
+ (union_declaration)
25
+ (opaque_declaration)
26
+ ])
27
+
28
+ [
29
+ (builtin_type)
30
+ "anyframe"
31
+ ] @type.builtin
32
+
33
+ ; Constants
34
+
35
+ ((identifier) @constant
36
+ (#lua-match? @constant "^[A-Z][A-Z_0-9]+$"))
37
+
38
+ [
39
+ "null"
40
+ "unreachable"
41
+ "undefined"
42
+ ] @constant.builtin
43
+
44
+ (field_expression
45
+ .
46
+ member: (identifier) @constant)
47
+
48
+ (enum_declaration
49
+ (container_field
50
+ type: (identifier) @constant))
51
+
52
+ ; Labels
53
+
54
+ (block_label (identifier) @label)
55
+
56
+ (break_label (identifier) @label)
57
+
58
+ ; Fields
59
+
60
+ (field_initializer
61
+ .
62
+ (identifier) @variable.member)
63
+
64
+ (field_expression
65
+ (_)
66
+ member: (identifier) @variable.member)
67
+
68
+ (container_field
69
+ name: (identifier) @variable.member)
70
+
71
+ (initializer_list
72
+ (assignment_expression
73
+ left: (field_expression
74
+ .
75
+ member: (identifier) @variable.member)))
76
+
77
+ ; Functions
78
+
79
+ (builtin_identifier) @function.builtin
80
+
81
+ (call_expression
82
+ function: (identifier) @function.call)
83
+
84
+ (call_expression
85
+ function: (field_expression
86
+ member: (identifier) @function.call))
87
+
88
+ (function_declaration
89
+ name: (identifier) @function)
90
+
91
+ ; Modules
92
+
93
+ (variable_declaration
94
+ (identifier) @module
95
+ (builtin_function
96
+ (builtin_identifier) @keyword.import
97
+ (#any-of? @keyword.import "@import" "@cImport")))
98
+
99
+ ; Builtins
100
+
101
+ [
102
+ "c"
103
+ "..."
104
+ ] @variable.builtin
105
+
106
+ ((identifier) @variable.builtin
107
+ (#eq? @variable.builtin "_"))
108
+
109
+ (calling_convention
110
+ (identifier) @variable.builtin)
111
+
112
+ ; Keywords
113
+
114
+ [
115
+ "asm"
116
+ "defer"
117
+ "errdefer"
118
+ "test"
119
+ "error"
120
+ "const"
121
+ "var"
122
+ ] @keyword
123
+
124
+ [
125
+ "struct"
126
+ "union"
127
+ "enum"
128
+ "opaque"
129
+ ] @keyword.type
130
+
131
+ [
132
+ "async"
133
+ "await"
134
+ "suspend"
135
+ "nosuspend"
136
+ "resume"
137
+ ] @keyword.coroutine
138
+
139
+ "fn" @keyword.function
140
+
141
+ [
142
+ "and"
143
+ "or"
144
+ "orelse"
145
+ ] @keyword.operator
146
+
147
+ "return" @keyword.return
148
+
149
+ [
150
+ "if"
151
+ "else"
152
+ "switch"
153
+ ] @keyword.conditional
154
+
155
+ [
156
+ "for"
157
+ "while"
158
+ "break"
159
+ "continue"
160
+ ] @keyword.repeat
161
+
162
+ [
163
+ "usingnamespace"
164
+ "export"
165
+ ] @keyword.import
166
+
167
+ [
168
+ "try"
169
+ "catch"
170
+ ] @keyword.exception
171
+
172
+ [
173
+ "volatile"
174
+ "allowzero"
175
+ "noalias"
176
+ "addrspace"
177
+ "align"
178
+ "callconv"
179
+ "linksection"
180
+ "pub"
181
+ "inline"
182
+ "noinline"
183
+ "extern"
184
+ "comptime"
185
+ "packed"
186
+ "threadlocal"
187
+ ] @keyword.modifier
188
+
189
+ ; Operator
190
+
191
+ [
192
+ "="
193
+ "*="
194
+ "*%="
195
+ "*|="
196
+ "/="
197
+ "%="
198
+ "+="
199
+ "+%="
200
+ "+|="
201
+ "-="
202
+ "-%="
203
+ "-|="
204
+ "<<="
205
+ "<<|="
206
+ ">>="
207
+ "&="
208
+ "^="
209
+ "|="
210
+ "!"
211
+ "~"
212
+ "-"
213
+ "-%"
214
+ "&"
215
+ "=="
216
+ "!="
217
+ ">"
218
+ ">="
219
+ "<="
220
+ "<"
221
+ "&"
222
+ "^"
223
+ "|"
224
+ "<<"
225
+ ">>"
226
+ "<<|"
227
+ "+"
228
+ "++"
229
+ "+%"
230
+ "-%"
231
+ "+|"
232
+ "-|"
233
+ "*"
234
+ "/"
235
+ "%"
236
+ "**"
237
+ "*%"
238
+ "*|"
239
+ "||"
240
+ ".*"
241
+ ".?"
242
+ "?"
243
+ ".."
244
+ ] @operator
245
+
246
+ ; Literals
247
+
248
+ (character) @character
249
+
250
+ ([
251
+ (string)
252
+ (multiline_string)
253
+ ] @string
254
+ (#set! "priority" 95))
255
+
256
+ (integer) @number
257
+
258
+ (float) @number.float
259
+
260
+ (boolean) @boolean
261
+
262
+ (escape_sequence) @string.escape
263
+
264
+ ; Punctuation
265
+
266
+ [
267
+ "["
268
+ "]"
269
+ "("
270
+ ")"
271
+ "{"
272
+ "}"
273
+ ] @punctuation.bracket
274
+
275
+ [
276
+ ";"
277
+ "."
278
+ ","
279
+ ":"
280
+ "=>"
281
+ "->"
282
+ ] @punctuation.delimiter
283
+
284
+ (payload "|" @punctuation.bracket)
285
+
286
+ ; Comments
287
+
288
+ (comment) @comment @spell
289
+
290
+ ((comment) @comment.documentation
291
+ (#lua-match? @comment.documentation "^//!"))
@@ -0,0 +1,22 @@
1
+ [
2
+ (block)
3
+ (switch_expression)
4
+ (initializer_list)
5
+ ] @indent.begin
6
+
7
+ (block
8
+ "}" @indent.end)
9
+
10
+ [
11
+ "("
12
+ ")"
13
+ "["
14
+ "]"
15
+ "{"
16
+ "}"
17
+ ] @indent.branch
18
+
19
+ [
20
+ (comment)
21
+ (multiline_string)
22
+ ] @indent.ignore
@@ -0,0 +1,10 @@
1
+ ((comment) @injection.content
2
+ (#set! injection.language "comment"))
3
+
4
+ ; TODO: add when asm is added
5
+ ; (asm_output_item (string) @injection.content
6
+ ; (#set! injection.language "asm"))
7
+ ; (asm_input_item (string) @injection.content
8
+ ; (#set! injection.language "asm"))
9
+ ; (asm_clobbers (string) @injection.content
10
+ ; (#set! injection.language "asm"))
Binary file
package/package.json CHANGED
@@ -1,64 +1,77 @@
1
1
  {
2
- "name": "ts-wasms",
3
- "version": "1.0.2",
4
- "description": "Pre-built WebAssembly binaries for tree-sitter grammars",
5
- "scripts": {
6
- "build": "node build.js"
7
- },
8
- "keywords": [
9
- "tree-sitter",
10
- "wasm"
11
- ],
12
- "author": "Crysthamus",
13
- "license": "MIT",
14
- "devEngines": {
15
- "packageManager": {
16
- "name": "pnpm",
17
- "version": "^11.1.2",
18
- "onFail": "download"
19
- }
20
- },
21
- "type": "module",
22
- "files": [
23
- "out"
24
- ],
25
- "devDependencies": {
26
- "@eagleoutice/tree-sitter-r": "^1.1.2",
27
- "@elm-tooling/tree-sitter-elm": "^5.9.0",
28
- "@tree-sitter-grammars/tree-sitter-lua": "^0.4.1",
29
- "@tree-sitter-grammars/tree-sitter-markdown": "^0.3.2",
30
- "@tree-sitter-grammars/tree-sitter-toml": "^0.7.0",
31
- "@tree-sitter-grammars/tree-sitter-xml": "^0.7.0",
32
- "@tree-sitter-grammars/tree-sitter-zig": "^1.1.2",
33
- "p-map": "^7.0.4",
34
- "tree-sitter-bash": "^0.25.1",
35
- "tree-sitter-c": "^0.24.1",
36
- "tree-sitter-c-sharp": "^0.23.5",
37
- "tree-sitter-cli": "^0.26.8",
38
- "tree-sitter-cpp": "^0.23.4",
39
- "tree-sitter-css": "^0.25.0",
40
- "tree-sitter-dart": "^1.0.0",
41
- "tree-sitter-elisp": "^1.6.1",
42
- "tree-sitter-elixir": "^0.3.5",
43
- "tree-sitter-embedded-template": "^0.25.0",
44
- "tree-sitter-go": "^0.25.0",
45
- "tree-sitter-haskell": "^0.23.1",
46
- "tree-sitter-html": "^0.23.2",
47
- "tree-sitter-java": "^0.23.5",
48
- "tree-sitter-javascript": "^0.25.0",
49
- "tree-sitter-json": "^0.24.8",
50
- "tree-sitter-kotlin": "^0.3.8",
51
- "tree-sitter-objc": "^3.0.2",
52
- "tree-sitter-ocaml": "^0.24.2",
53
- "tree-sitter-perl": "git+https://github.com/tree-sitter-perl/tree-sitter-perl.git#release",
54
- "tree-sitter-php": "^0.24.2",
55
- "tree-sitter-python": "^0.25.0",
56
- "tree-sitter-regex": "^0.25.0",
57
- "tree-sitter-ruby": "^0.23.1",
58
- "tree-sitter-rust": "^0.24.0",
59
- "tree-sitter-scala": "^0.24.0",
60
- "tree-sitter-swift": "^0.7.1",
61
- "tree-sitter-typescript": "^0.23.2",
62
- "tree-sitter-vue": "^0.2.1"
63
- }
64
- }
2
+ "name": "ts-wasms",
3
+ "version": "1.0.3",
4
+ "description": "Pre-built WebAssembly binaries for tree-sitter grammars.",
5
+ "keywords": [
6
+ "tree-sitter",
7
+ "wasm"
8
+ ],
9
+ "author": "Crysthamus",
10
+ "license": "MIT",
11
+ "devEngines": {
12
+ "packageManager": {
13
+ "name": "pnpm",
14
+ "version": "^11.1.2",
15
+ "onFail": "download"
16
+ }
17
+ },
18
+ "type": "module",
19
+ "files": [
20
+ "out"
21
+ ],
22
+ "devDependencies": {
23
+ "@6cdh/tree-sitter-racket": "0.24.7-1",
24
+ "@6cdh/tree-sitter-scheme": "0.24.7-1",
25
+ "@eagleoutice/tree-sitter-r": "^1.1.2",
26
+ "@elm-tooling/tree-sitter-elm": "^5.9.0",
27
+ "@tree-sitter-grammars/tree-sitter-lua": "^0.4.1",
28
+ "@tree-sitter-grammars/tree-sitter-markdown": "^0.3.2",
29
+ "@tree-sitter-grammars/tree-sitter-toml": "^0.7.0",
30
+ "@tree-sitter-grammars/tree-sitter-xml": "^0.7.0",
31
+ "@tree-sitter-grammars/tree-sitter-zig": "^1.1.2",
32
+ "p-map": "^7.0.4",
33
+ "tree-sitter-bash": "^0.25.1",
34
+ "tree-sitter-c": "^0.24.1",
35
+ "tree-sitter-c-sharp": "^0.23.5",
36
+ "tree-sitter-cli": "^0.26.8",
37
+ "tree-sitter-clojure": "git+https://github.com/sogaiu/tree-sitter-clojure.git",
38
+ "tree-sitter-clojurescript": "git+https://github.com/sogaiu/tree-sitter-clojure.git",
39
+ "tree-sitter-commonlisp": "git+https://github.com/tree-sitter-grammars/tree-sitter-commonlisp.git",
40
+ "tree-sitter-cpp": "^0.23.4",
41
+ "tree-sitter-css": "^0.25.0",
42
+ "tree-sitter-dart": "^1.0.0",
43
+ "tree-sitter-elisp": "^1.6.1",
44
+ "tree-sitter-elixir": "^0.3.5",
45
+ "tree-sitter-embedded-template": "^0.25.0",
46
+ "tree-sitter-erlang": "git+https://github.com/WhatsApp/tree-sitter-erlang.git",
47
+ "tree-sitter-go": "^0.25.0",
48
+ "tree-sitter-graphql": "git+https://github.com/joowani/tree-sitter-graphql.git",
49
+ "tree-sitter-haskell": "^0.23.1",
50
+ "tree-sitter-html": "^0.23.2",
51
+ "tree-sitter-java": "^0.23.5",
52
+ "tree-sitter-javascript": "^0.25.0",
53
+ "tree-sitter-json": "^0.24.8",
54
+ "tree-sitter-julia": "git+https://github.com/tree-sitter/tree-sitter-julia.git",
55
+ "tree-sitter-kotlin": "^0.3.8",
56
+ "tree-sitter-objc": "^3.0.2",
57
+ "tree-sitter-ocaml": "^0.24.2",
58
+ "tree-sitter-perl": "git+https://github.com/tree-sitter-perl/tree-sitter-perl.git#release",
59
+ "tree-sitter-php": "^0.24.2",
60
+ "tree-sitter-prisma": "git+https://github.com/victorhqc/tree-sitter-prisma.git",
61
+ "tree-sitter-python": "^0.25.0",
62
+ "tree-sitter-query": "git+https://github.com/tree-sitter-grammars/tree-sitter-query.git",
63
+ "tree-sitter-regex": "^0.25.0",
64
+ "tree-sitter-ruby": "^0.23.1",
65
+ "tree-sitter-rust": "^0.24.0",
66
+ "tree-sitter-scala": "^0.24.0",
67
+ "tree-sitter-sql": "^0.1.0",
68
+ "tree-sitter-swift": "^0.7.1",
69
+ "tree-sitter-typescript": "^0.23.2",
70
+ "tree-sitter-vimdoc": "git+https://github.com/neovim/tree-sitter-vimdoc.git",
71
+ "tree-sitter-vue": "^0.2.1",
72
+ "tree-sitter-yaml": "git+https://github.com/ikatyang/tree-sitter-yaml.git"
73
+ },
74
+ "scripts": {
75
+ "build": "node build.js"
76
+ }
77
+ }
package/README DELETED
@@ -1,2 +0,0 @@
1
- # A tree-sitter WASM builder
2
- Please visit https://www.jsdelivr.com/package/npm/ts-wasms