tree-sitter-wasm 1.0.2 → 1.0.4

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/index.d.ts CHANGED
@@ -33,6 +33,7 @@ export type QueryMap = {
33
33
  "embedded_template": "highlights" | "injections" | "injections-ejs" | "injections-erb" | "injections-etlua";
34
34
  "erlang": "folds" | "highlights" | "injections";
35
35
  "fish": "folds" | "highlights" | "indents" | "injections" | "locals";
36
+ "fortran": "folds" | "highlights" | "indents" | "injections" | "locals" | "tags";
36
37
  "gdscript": "folds" | "highlights" | "indents" | "injections" | "locals";
37
38
  "gdshader": "highlights" | "injections" | "locals" | "tags";
38
39
  "git_config": "folds" | "highlights" | "injections";
@@ -57,6 +58,7 @@ export type QueryMap = {
57
58
  "just": "folds" | "highlights" | "indents" | "injections" | "locals";
58
59
  "kdl": "folds" | "highlights" | "indents" | "injections" | "locals";
59
60
  "kotlin": "folds" | "highlights" | "injections" | "locals";
61
+ "latex": "folds" | "highlights" | "injections";
60
62
  "liquid": "highlights" | "injections";
61
63
  "lua": "folds" | "highlights" | "indents" | "injections" | "locals" | "tags";
62
64
  "make": "folds" | "highlights" | "injections";
@@ -92,13 +94,16 @@ export type QueryMap = {
92
94
  "solidity": "folds" | "highlights" | "highlights-nvim" | "injections" | "locals" | "tags";
93
95
  "sql": "folds" | "highlights" | "indents" | "injections";
94
96
  "ssh_config": "folds" | "highlights" | "indents" | "injections" | "locals";
97
+ "svelte": "folds" | "highlights" | "indents" | "injections" | "locals" | "tags";
95
98
  "swift": "folds" | "highlights" | "indents" | "injections" | "locals" | "outline" | "tags" | "textobjects";
99
+ "systemverilog": "folds" | "highlights" | "injections";
96
100
  "templ": "folds" | "highlights" | "injections";
97
101
  "terraform": "folds" | "highlights" | "indents" | "injections";
98
102
  "toml": "folds" | "highlights" | "indents" | "injections" | "locals";
99
103
  "tsv": "highlights";
100
104
  "tsx": "folds" | "highlights" | "indents" | "injections" | "locals" | "tags";
101
105
  "typescript": "folds" | "highlights" | "indents" | "injections" | "locals" | "tags";
106
+ "typst": "folds" | "highlights" | "indents" | "injections";
102
107
  "vim": "folds" | "highlights" | "injections" | "locals";
103
108
  "vimdoc": "highlights" | "injections";
104
109
  "vue": "folds" | "highlights" | "indents" | "injections";
package/manifest.json CHANGED
@@ -213,6 +213,14 @@
213
213
  "injections",
214
214
  "locals"
215
215
  ],
216
+ "fortran": [
217
+ "folds",
218
+ "highlights",
219
+ "indents",
220
+ "injections",
221
+ "locals",
222
+ "tags"
223
+ ],
216
224
  "gdscript": [
217
225
  "folds",
218
226
  "highlights",
@@ -366,6 +374,11 @@
366
374
  "injections",
367
375
  "locals"
368
376
  ],
377
+ "latex": [
378
+ "folds",
379
+ "highlights",
380
+ "injections"
381
+ ],
369
382
  "liquid": [
370
383
  "highlights",
371
384
  "injections"
@@ -590,6 +603,14 @@
590
603
  "injections",
591
604
  "locals"
592
605
  ],
606
+ "svelte": [
607
+ "folds",
608
+ "highlights",
609
+ "indents",
610
+ "injections",
611
+ "locals",
612
+ "tags"
613
+ ],
593
614
  "swift": [
594
615
  "folds",
595
616
  "highlights",
@@ -600,6 +621,11 @@
600
621
  "tags",
601
622
  "textobjects"
602
623
  ],
624
+ "systemverilog": [
625
+ "folds",
626
+ "highlights",
627
+ "injections"
628
+ ],
603
629
  "templ": [
604
630
  "folds",
605
631
  "highlights",
@@ -637,6 +663,12 @@
637
663
  "locals",
638
664
  "tags"
639
665
  ],
666
+ "typst": [
667
+ "folds",
668
+ "highlights",
669
+ "indents",
670
+ "injections"
671
+ ],
640
672
  "vim": [
641
673
  "folds",
642
674
  "highlights",
package/out/d/tags.scm CHANGED
@@ -26,3 +26,4 @@
26
26
  (variable_declaration (type (identifier) @name) @reference.class (declarator))
27
27
 
28
28
  ((alias_declaration (alias_initializer . (identifier) @name))) @definition.class
29
+ (mixin_template_declaration (mixin) (template_declaration (template) (identifier) @name)) @definition.type
@@ -0,0 +1,12 @@
1
+ ;; by @oponkork
2
+ [
3
+ (if_statement)
4
+ (where_statement)
5
+ (enum_statement)
6
+ (do_loop)
7
+ (derived_type_definition)
8
+ (function)
9
+ (subroutine)
10
+ (module_procedure)
11
+ (interface)
12
+ ] @fold
@@ -0,0 +1,204 @@
1
+ [
2
+ (identifier)
3
+ (module_name)
4
+ ] @variable
5
+
6
+ (string_literal) @string
7
+ (number_literal) @number
8
+ (statement_label) @number
9
+ (statement_label_reference) @number
10
+ (boolean_literal) @boolean
11
+ (comment) @comment
12
+ (custom_directive) @custom_directive
13
+
14
+ [
15
+ (derived_type)
16
+ (derived_type_statement)
17
+ (import_statement)
18
+ (intrinsic_type)
19
+ (type_name)
20
+ ] @type
21
+
22
+ (intrinsic_type) @type.builtin
23
+
24
+ (base_type_specifier
25
+ (identifier) @type)
26
+
27
+ [
28
+ (module_statement)
29
+ (submodule_statement)
30
+ ] @module
31
+
32
+ [
33
+ (abstract_specifier)
34
+ (access_specifier)
35
+ (block_label)
36
+ (block_label_start_expression)
37
+ (none)
38
+ (procedure_attributes)
39
+ (procedure_qualifier)
40
+ (type_qualifier)
41
+ ] @attribute
42
+
43
+ [
44
+ "#define"
45
+ "#elif"
46
+ "#endif"
47
+ "#if"
48
+ "#ifdef"
49
+ (base_type_specifier)
50
+ (block_construct)
51
+ (contains_statement)
52
+ (default)
53
+ (end_associate_statement)
54
+ (end_block_construct_statement)
55
+ (end_block_data_statement)
56
+ (end_coarray_critical_statement)
57
+ (end_coarray_team_statement)
58
+ (end_do_loop_statement)
59
+ (end_enum_statement)
60
+ (end_enumeration_type_statement)
61
+ (end_forall_statement)
62
+ (end_function_statement)
63
+ (end_if_statement)
64
+ (end_interface_statement)
65
+ (end_module_procedure_statement)
66
+ (end_module_statement)
67
+ (end_program_statement)
68
+ (end_select_statement)
69
+ (end_submodule_statement)
70
+ (end_subroutine_statement)
71
+ (end_type_statement)
72
+ (end_where_statement)
73
+ (enum_statement)
74
+ (enumeration_type_statement)
75
+ (enumerator_statement)
76
+ (equivalence_statement)
77
+ (function_statement)
78
+ (implicit_statement)
79
+ (interface_statement)
80
+ (keyword_statement)
81
+ (language_binding)
82
+ (namelist_statement)
83
+ (print_statement)
84
+ (procedure_statement)
85
+ (program_statement)
86
+ (subroutine_statement)
87
+ ] @keyword
88
+
89
+ (use_statement "use" @keyword)
90
+ (use_statement "intrinsic" @keyword)
91
+ (included_items "only" @keyword)
92
+ (allocate_statement "allocate" @keyword)
93
+ (deallocate_statement "deallocate" @keyword)
94
+ (subroutine_call "call" @keyword)
95
+ (do_statement "do" @keyword)
96
+ (while_statement "while" @keyword)
97
+ (if_statement ["if" "then"] @keyword)
98
+ (elseif_clause ["else" "if" "elseif"] @keyword)
99
+ (else_clause "else" @keyword)
100
+ (open_statement "open" @keyword)
101
+ (write_statement "write" @keyword)
102
+ (private_statement "private" @keyword)
103
+ (public_statement "public" @keyword)
104
+
105
+
106
+ (select_case_statement "select" @keyword "case" @keyword)
107
+ (select_type_statement "select" @keyword "type" @keyword)
108
+ (select_rank_statement "select" @keyword "rank" @keyword)
109
+ (case_statement "case" @keyword)
110
+ (type_statement "type" @keyword)
111
+ (rank_statement "rank" @keyword)
112
+
113
+
114
+ [
115
+ "*"
116
+ "+"
117
+ "-"
118
+ "/"
119
+ "="
120
+ "<"
121
+ ">"
122
+ "<="
123
+ ">="
124
+ "=="
125
+ "/="
126
+ ".and."
127
+ ".or."
128
+ ".lt."
129
+ ".gt."
130
+ ".ge."
131
+ ".le."
132
+ ".eq."
133
+ ".eqv."
134
+ ".neqv."
135
+ ".ne."
136
+ ] @operator
137
+
138
+ ;; Brackets
139
+ [
140
+ "("
141
+ ")"
142
+ "["
143
+ "]"
144
+ "<<<"
145
+ ">>>"
146
+ ] @punctuation.bracket
147
+
148
+ ;; Delimiter
149
+ [
150
+ "::"
151
+ ","
152
+ "%"
153
+ ":"
154
+ ] @punctuation.delimiter
155
+
156
+ "&" @punctuation.special
157
+
158
+ (parameters
159
+ (identifier) @variable.parameter)
160
+
161
+ (program_statement
162
+ (name) @variable)
163
+
164
+ (module_statement
165
+ (name) @variable)
166
+
167
+ (submodule_statement
168
+ (module_name) (name) @variable)
169
+
170
+ (function_statement
171
+ (name) @function)
172
+
173
+ (subroutine_statement
174
+ (name) @function)
175
+
176
+ (module_procedure_statement
177
+ (name) @function)
178
+
179
+ (end_program_statement
180
+ (name) @variable)
181
+
182
+ (end_module_statement
183
+ (name) @variable)
184
+
185
+ (end_submodule_statement
186
+ (name) @variable)
187
+
188
+ (end_function_statement
189
+ (name) @function)
190
+
191
+ (end_subroutine_statement
192
+ (name) @function)
193
+
194
+ (end_module_procedure_statement
195
+ (name) @function)
196
+
197
+ (subroutine_call
198
+ (identifier) @function)
199
+
200
+ (keyword_argument
201
+ name: (identifier) @keyword)
202
+
203
+ (derived_type_member_expression
204
+ (type_member) @property)
@@ -0,0 +1,31 @@
1
+ [
2
+ (module)
3
+ (submodule)
4
+ (program)
5
+ (subroutine)
6
+ (module_procedure)
7
+ (function)
8
+ ; (interface)
9
+ (if_statement)
10
+ (do_loop)
11
+ (where_statement)
12
+ (derived_type_definition)
13
+ (enum)
14
+ ] @indent
15
+
16
+ [
17
+ (end_module_statement)
18
+ (end_submodule_statement)
19
+ (end_program_statement)
20
+ (end_subroutine_statement)
21
+ (end_module_procedure_statement)
22
+ (end_function_statement)
23
+ ; (end_interface_statement)
24
+ (end_if_statement)
25
+ (end_do_loop_statement)
26
+ (else_clause)
27
+ (elseif_clause)
28
+ (end_type_statement)
29
+ (end_enum_statement)
30
+ (end_where_statement)
31
+ ] @branch
@@ -0,0 +1,2 @@
1
+ ((comment) @injection.content
2
+ (#set! injection.language "comment"))
@@ -0,0 +1,10 @@
1
+ (derived_type_definition) @local.scope
2
+ (program) @local.scope
3
+ (module) @local.scope
4
+ (submodule) @local.scope
5
+ (interface) @local.scope
6
+ (function) @local.scope
7
+ (subroutine) @local.scope
8
+ (block_construct) @local.scope
9
+
10
+ (variable_declaration declarator: (identifier) @local.definition)
@@ -0,0 +1,42 @@
1
+ (derived_type_statement
2
+ (type_name) @name) @definition.class
3
+
4
+ (base_type_specifier
5
+ (identifier) @name) @reference.class
6
+
7
+ (program_statement
8
+ (name) @name) @definition.module
9
+
10
+ (module_statement
11
+ (name) @name) @definition.module
12
+
13
+ (submodule_statement
14
+ (module_name) (name) @name) @definition.module
15
+
16
+ (interface
17
+ (function
18
+ (function_statement
19
+ (name) @name) @definition.interface))
20
+
21
+ (interface
22
+ (subroutine
23
+ (subroutine_statement
24
+ (name) @name) @definition.interface))
25
+
26
+ (function_statement
27
+ (name) @name) @definition.function
28
+
29
+ (subroutine_statement
30
+ (name) @name) @definition.function
31
+
32
+ (module_procedure_statement
33
+ (name) @name) @reference.implementation
34
+
35
+ (call_expression
36
+ (identifier) @name) @reference.call
37
+
38
+ (subroutine_call
39
+ (identifier) @name) @reference.call
40
+
41
+ (derived_type
42
+ (type_name) @name) @reference.class
@@ -0,0 +1,14 @@
1
+ [
2
+ (chapter)
3
+ (part)
4
+ (section)
5
+ (subsection)
6
+ (subsubsection)
7
+ (paragraph)
8
+ (subparagraph)
9
+ (generic_environment)
10
+ (math_environment)
11
+ (comment_environment)
12
+ (block_comment)
13
+ (displayed_equation)
14
+ ] @fold