qlue-ls 0.3.3 → 0.4.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 CHANGED
@@ -5,7 +5,7 @@
5
5
  "Ioannis Nezis <ioannis@nezis.de>"
6
6
  ],
7
7
  "description": "A formatter for SPARQL queries",
8
- "version": "0.3.3",
8
+ "version": "0.4.0",
9
9
  "license": "SEE LICENSE IN LICENSE",
10
10
  "repository": {
11
11
  "type": "git",
@@ -14,13 +14,11 @@
14
14
  "files": [
15
15
  "qlue_ls_bg.wasm",
16
16
  "qlue_ls.js",
17
- "qlue_ls_bg.js",
18
17
  "qlue_ls.d.ts"
19
18
  ],
20
19
  "main": "qlue_ls.js",
21
20
  "types": "qlue_ls.d.ts",
22
21
  "sideEffects": [
23
- "./qlue_ls.js",
24
22
  "./snippets/*"
25
23
  ],
26
24
  "keywords": [
package/qlue_ls.d.ts CHANGED
@@ -1,9 +1,305 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  export function format_raw(text: string): string;
4
+ export function determine_operation_type(text: string): string;
4
5
  export function init_language_server(writer: WritableStreamDefaultWriter): Server;
5
6
  export class Server {
6
7
  private constructor();
7
8
  free(): void;
8
9
  listen(reader: ReadableStreamDefaultReader): Promise<void>;
9
10
  }
11
+
12
+ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
13
+
14
+ export interface InitOutput {
15
+ readonly memory: WebAssembly.Memory;
16
+ readonly ts_query_cursor_exec: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
17
+ readonly format_raw: (a: number, b: number) => [number, number, number, number];
18
+ readonly determine_operation_type: (a: number, b: number) => [number, number, number, number];
19
+ readonly init_language_server: (a: any) => number;
20
+ readonly server_listen: (a: number, b: any) => any;
21
+ readonly ts_query_cursor_next_capture: (a: number, b: number, c: number) => number;
22
+ readonly ts_parser_parse_with_options: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
23
+ readonly __wbg_server_free: (a: number, b: number) => void;
24
+ readonly ts_query_new: (a: number, b: number, c: number, d: number, e: number) => number;
25
+ readonly ts_query_delete: (a: number) => void;
26
+ readonly ts_query_pattern_count: (a: number) => number;
27
+ readonly ts_query_capture_count: (a: number) => number;
28
+ readonly ts_query_string_count: (a: number) => number;
29
+ readonly ts_query_capture_name_for_id: (a: number, b: number, c: number) => number;
30
+ readonly ts_query_capture_quantifier_for_id: (a: number, b: number, c: number) => number;
31
+ readonly ts_query_string_value_for_id: (a: number, b: number, c: number) => number;
32
+ readonly ts_query_predicates_for_pattern: (a: number, b: number, c: number) => number;
33
+ readonly ts_query_start_byte_for_pattern: (a: number, b: number) => number;
34
+ readonly ts_query_end_byte_for_pattern: (a: number, b: number) => number;
35
+ readonly ts_query_is_pattern_rooted: (a: number, b: number) => number;
36
+ readonly ts_query_is_pattern_non_local: (a: number, b: number) => number;
37
+ readonly ts_query_is_pattern_guaranteed_at_step: (a: number, b: number) => number;
38
+ readonly ts_query__step_is_fallible: (a: number, b: number) => number;
39
+ readonly ts_query_disable_capture: (a: number, b: number, c: number) => void;
40
+ readonly ts_query_disable_pattern: (a: number, b: number) => void;
41
+ readonly ts_query_cursor_new: () => number;
42
+ readonly ts_query_cursor_delete: (a: number) => void;
43
+ readonly ts_query_cursor_did_exceed_match_limit: (a: number) => number;
44
+ readonly ts_query_cursor_match_limit: (a: number) => number;
45
+ readonly ts_query_cursor_set_match_limit: (a: number, b: number) => void;
46
+ readonly ts_query_cursor_timeout_micros: (a: number) => bigint;
47
+ readonly ts_query_cursor_set_timeout_micros: (a: number, b: bigint) => void;
48
+ readonly ts_language_symbol_for_name: (a: number, b: number, c: number, d: number) => number;
49
+ readonly ts_language_field_id_for_name: (a: number, b: number, c: number) => number;
50
+ readonly ts_tree_cursor_delete: (a: number) => void;
51
+ readonly ts_tree_cursor_init: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
52
+ readonly ts_query_cursor_exec_with_options: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
53
+ readonly ts_query_cursor_set_byte_range: (a: number, b: number, c: number) => number;
54
+ readonly ts_query_cursor_set_point_range: (a: number, b: number, c: number, d: number, e: number) => number;
55
+ readonly ts_node_end_byte: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
56
+ readonly ts_node_end_point: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
57
+ readonly ts_query_cursor__compare_nodes: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number) => number;
58
+ readonly ts_query_cursor__compare_captures: (a: number, b: number, c: number, d: number, e: number) => void;
59
+ readonly ts_tree_cursor_current_node: (a: number, b: number) => void;
60
+ readonly ts_tree_cursor_parent_node: (a: number, b: number) => void;
61
+ readonly ts_tree_cursor_goto_sibling_internal: (a: number, b: number) => number;
62
+ readonly ts_tree_cursor_goto_parent: (a: number) => number;
63
+ readonly ts_node_symbol: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
64
+ readonly ts_node_is_named: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
65
+ readonly ts_node_is_missing: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
66
+ readonly ts_tree_cursor_current_status: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
67
+ readonly ts_node_child_by_field_id: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
68
+ readonly ts_tree_cursor_goto_first_child_internal: (a: number) => number;
69
+ readonly ts_query_cursor_next_match: (a: number, b: number) => number;
70
+ readonly ts_query_cursor_remove_match: (a: number, b: number) => void;
71
+ readonly ts_query_cursor_set_max_start_depth: (a: number, b: number) => void;
72
+ readonly ts_parser_new: () => number;
73
+ readonly ts_parser_delete: (a: number) => void;
74
+ readonly ts_parser_reset: (a: number) => void;
75
+ readonly ts_parser_language: (a: number) => number;
76
+ readonly ts_parser_set_language: (a: number, b: number) => number;
77
+ readonly ts_parser_logger: (a: number, b: number) => void;
78
+ readonly ts_parser_set_logger: (a: number, b: number, c: number) => void;
79
+ readonly ts_parser_print_dot_graphs: (a: number, b: number) => void;
80
+ readonly ts_parser_cancellation_flag: (a: number) => number;
81
+ readonly ts_parser_set_cancellation_flag: (a: number, b: number) => void;
82
+ readonly ts_parser_timeout_micros: (a: number) => bigint;
83
+ readonly ts_parser_set_timeout_micros: (a: number, b: bigint) => void;
84
+ readonly ts_parser_set_included_ranges: (a: number, b: number, c: number) => number;
85
+ readonly ts_parser_included_ranges: (a: number, b: number) => number;
86
+ readonly ts_parser_parse: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
87
+ readonly ts_subtree_last_external_token: (a: number, b: number, c: number) => void;
88
+ readonly ts_stack_pop_pending: (a: number, b: number, c: number) => void;
89
+ readonly ts_language_next_state: (a: number, b: number, c: number) => number;
90
+ readonly ts_subtree_retain: (a: number, b: number) => void;
91
+ readonly ts_stack_push: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
92
+ readonly ts_subtree_release: (a: number, b: number, c: number) => void;
93
+ readonly ts_stack_print_dot_graph: (a: number, b: number, c: number) => number;
94
+ readonly ts_stack_error_cost: (a: number, b: number) => number;
95
+ readonly ts_stack_node_count_since_error: (a: number, b: number) => number;
96
+ readonly ts_stack_position: (a: number, b: number, c: number) => void;
97
+ readonly ts_stack_can_merge: (a: number, b: number, c: number) => number;
98
+ readonly ts_subtree_compare: (a: number, b: number, c: number, d: number, e: number) => number;
99
+ readonly ts_subtree_array_remove_trailing_extras: (a: number, b: number) => void;
100
+ readonly ts_subtree_new_node: (a: number, b: number, c: number, d: number, e: number) => void;
101
+ readonly ts_subtree_array_delete: (a: number, b: number) => void;
102
+ readonly ts_subtree_array_clear: (a: number, b: number) => void;
103
+ readonly ts_stack_merge: (a: number, b: number, c: number) => number;
104
+ readonly ts_stack_remove_version: (a: number, b: number) => void;
105
+ readonly ts_language_table_entry: (a: number, b: number, c: number, d: number) => void;
106
+ readonly ts_stack_renumber_version: (a: number, b: number, c: number) => void;
107
+ readonly ts_stack_pop_error: (a: number, b: number, c: number) => void;
108
+ readonly ts_subtree_make_mut: (a: number, b: number, c: number, d: number) => void;
109
+ readonly ts_stack_set_last_external_token: (a: number, b: number, c: number, d: number) => void;
110
+ readonly ts_subtree_external_scanner_state_eq: (a: number, b: number, c: number, d: number) => number;
111
+ readonly ts_lexer_start: (a: number) => void;
112
+ readonly ts_lexer_finish: (a: number, b: number) => void;
113
+ readonly ts_subtree_external_scanner_state: (a: number, b: number) => number;
114
+ readonly ts_stack_has_advanced_since_error: (a: number, b: number) => number;
115
+ readonly ts_subtree_new_error: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number) => void;
116
+ readonly ts_language_is_reserved_word: (a: number, b: number, c: number) => number;
117
+ readonly ts_subtree_new_leaf: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number) => void;
118
+ readonly ts_external_scanner_state_init: (a: number, b: number, c: number) => void;
119
+ readonly ts_subtree_set_symbol: (a: number, b: number, c: number) => void;
120
+ readonly ts_lexer_init: (a: number) => void;
121
+ readonly ts_subtree_pool_new: (a: number, b: number) => void;
122
+ readonly ts_stack_new: (a: number) => number;
123
+ readonly ts_stack_delete: (a: number) => void;
124
+ readonly ts_lexer_delete: (a: number) => void;
125
+ readonly ts_subtree_pool_delete: (a: number) => void;
126
+ readonly ts_lexer_set_included_ranges: (a: number, b: number, c: number) => number;
127
+ readonly ts_stack_clear: (a: number) => void;
128
+ readonly ts_range_array_get_changed_ranges: (a: number, b: number, c: number, d: number, e: number) => void;
129
+ readonly ts_subtree_print_dot_graph: (a: number, b: number, c: number, d: number) => void;
130
+ readonly ts_stack_resume: (a: number, b: number, c: number) => void;
131
+ readonly ts_stack_copy_version: (a: number, b: number) => number;
132
+ readonly ts_subtree_new_missing_leaf: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
133
+ readonly ts_stack_record_summary: (a: number, b: number, c: number) => void;
134
+ readonly ts_subtree_compress: (a: number, b: number, c: number, d: number, e: number) => void;
135
+ readonly ts_tree_new: (a: number, b: number, c: number, d: number, e: number) => number;
136
+ readonly ts_parser_parse_string: (a: number, b: number, c: number, d: number) => number;
137
+ readonly ts_parser_parse_string_encoding: (a: number, b: number, c: number, d: number, e: number) => number;
138
+ readonly ts_parser_set_wasm_store: (a: number, b: number) => void;
139
+ readonly ts_parser_take_wasm_store: (a: number) => number;
140
+ readonly ts_language_symbol_type: (a: number, b: number) => number;
141
+ readonly ts_lookahead_iterator_new: (a: number, b: number) => number;
142
+ readonly ts_tree_root_node: (a: number, b: number) => void;
143
+ readonly ts_tree_root_node_with_offset: (a: number, b: number, c: number, d: number, e: number) => void;
144
+ readonly ts_tree_edit: (a: number, b: number) => void;
145
+ readonly ts_tree_get_changed_ranges: (a: number, b: number, c: number) => number;
146
+ readonly ts_tree_included_ranges: (a: number, b: number) => number;
147
+ readonly ts_tree_delete: (a: number) => void;
148
+ readonly ts_tree_copy: (a: number) => number;
149
+ readonly ts_node_grammar_symbol: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
150
+ readonly ts_node_type: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
151
+ readonly ts_node_grammar_type: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
152
+ readonly ts_node_is_extra: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
153
+ readonly ts_node_has_changes: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
154
+ readonly ts_node_has_error: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
155
+ readonly ts_node_parse_state: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
156
+ readonly ts_node_next_parse_state: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
157
+ readonly ts_node_child_count: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
158
+ readonly ts_node_named_child_count: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
159
+ readonly ts_node_field_name_for_child: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => number;
160
+ readonly ts_node_field_name_for_named_child: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => number;
161
+ readonly ts_node_parent: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
162
+ readonly ts_node_child_with_descendant: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number) => void;
163
+ readonly ts_node_descendant_count: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
164
+ readonly ts_node_string: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
165
+ readonly ts_node_edit: (a: number, b: number) => void;
166
+ readonly ts_tree_cursor_current_field_id: (a: number) => number;
167
+ readonly ts_tree_cursor_current_depth: (a: number) => number;
168
+ readonly ts_tree_cursor_goto_last_child_internal: (a: number) => number;
169
+ readonly ts_tree_cursor_goto_next_sibling: (a: number) => number;
170
+ readonly ts_tree_cursor_goto_descendant: (a: number, b: number) => void;
171
+ readonly ts_tree_cursor_goto_previous_sibling: (a: number) => number;
172
+ readonly ts_tree_cursor_reset_to: (a: number, b: number) => void;
173
+ readonly ts_tree_cursor_copy: (a: number, b: number) => void;
174
+ readonly ts_lookahead_iterator_current_symbol_name: (a: number) => number;
175
+ readonly ts_lookahead_iterator_reset: (a: number, b: number, c: number) => number;
176
+ readonly ts_lookahead_iterator_reset_state: (a: number, b: number) => number;
177
+ readonly ts_lookahead_iterator_next: (a: number) => number;
178
+ readonly ts_lookahead_iterator_delete: (a: number) => void;
179
+ readonly ts_external_scanner_state_copy: (a: number, b: number) => void;
180
+ readonly ts_external_scanner_state_delete: (a: number) => void;
181
+ readonly ts_external_scanner_state_data: (a: number) => number;
182
+ readonly ts_external_scanner_state_eq: (a: number, b: number, c: number) => number;
183
+ readonly ts_subtree_array_copy: (a: number, b: number, c: number, d: number) => void;
184
+ readonly ts_subtree_array_reverse: (a: number) => void;
185
+ readonly ts_subtree_clone: (a: number, b: number, c: number) => void;
186
+ readonly ts_subtree_summarize_children: (a: number, b: number, c: number) => void;
187
+ readonly ts_subtree_new_error_node: (a: number, b: number, c: number, d: number) => void;
188
+ readonly ts_subtree_edit: (a: number, b: number, c: number, d: number, e: number) => void;
189
+ readonly ts_subtree_string: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
190
+ readonly ts_subtree__print_dot_graph: (a: number, b: number, c: number, d: number, e: number) => void;
191
+ readonly ts_stack_version_count: (a: number) => number;
192
+ readonly ts_stack_state: (a: number, b: number) => number;
193
+ readonly ts_stack_last_external_token: (a: number, b: number, c: number) => void;
194
+ readonly ts_stack_pop_count: (a: number, b: number, c: number, d: number) => void;
195
+ readonly ts_stack_pop_all: (a: number, b: number, c: number) => void;
196
+ readonly ts_stack_get_summary: (a: number, b: number) => number;
197
+ readonly ts_stack_dynamic_precedence: (a: number, b: number) => number;
198
+ readonly ts_stack_swap_versions: (a: number, b: number, c: number) => void;
199
+ readonly ts_stack_halt: (a: number, b: number) => void;
200
+ readonly ts_stack_pause: (a: number, b: number, c: number, d: number) => void;
201
+ readonly ts_stack_is_active: (a: number, b: number) => number;
202
+ readonly ts_stack_is_halted: (a: number, b: number) => number;
203
+ readonly ts_stack_is_paused: (a: number, b: number) => number;
204
+ readonly ts_tree_cursor_new: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
205
+ readonly ts_tree_cursor_reset: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
206
+ readonly ts_tree_cursor_goto_first_child: (a: number) => number;
207
+ readonly ts_tree_cursor_goto_last_child: (a: number) => number;
208
+ readonly ts_tree_cursor_goto_first_child_for_byte: (a: number, b: number) => number;
209
+ readonly ts_tree_cursor_goto_first_child_for_point: (a: number, b: number, c: number) => number;
210
+ readonly ts_tree_cursor_goto_next_sibling_internal: (a: number) => number;
211
+ readonly ts_tree_cursor_goto_previous_sibling_internal: (a: number) => number;
212
+ readonly ts_tree_cursor_current_descendant_index: (a: number) => number;
213
+ readonly ts_tree_cursor_current_field_name: (a: number) => number;
214
+ readonly ts_node_new: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
215
+ readonly ts_node_start_byte: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
216
+ readonly ts_node_start_point: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
217
+ readonly ts_node_language: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
218
+ readonly ts_node_eq: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number) => number;
219
+ readonly ts_node_is_null: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
220
+ readonly ts_node_is_error: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
221
+ readonly ts_node_child: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
222
+ readonly ts_node_named_child: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
223
+ readonly ts_node_child_by_field_name: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
224
+ readonly ts_node_next_sibling: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
225
+ readonly ts_node_next_named_sibling: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
226
+ readonly ts_node_prev_sibling: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
227
+ readonly ts_node_prev_named_sibling: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
228
+ readonly ts_node_first_child_for_byte: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
229
+ readonly ts_node_first_named_child_for_byte: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
230
+ readonly ts_node_descendant_for_byte_range: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
231
+ readonly ts_node_named_descendant_for_byte_range: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
232
+ readonly ts_node_descendant_for_point_range: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number) => void;
233
+ readonly ts_node_named_descendant_for_point_range: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number) => void;
234
+ readonly ts_range_array_intersects: (a: number, b: number, c: number, d: number) => number;
235
+ readonly ts_subtree_get_changed_ranges: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => number;
236
+ readonly ts_tree_language: (a: number) => number;
237
+ readonly ts_wasm_store_start: (a: number, b: number, c: number) => number;
238
+ readonly ts_wasm_store_call_lex_keyword: (a: number, b: number) => number;
239
+ readonly ts_wasm_store_call_scanner_create: (a: number) => number;
240
+ readonly ts_wasm_store_call_scanner_destroy: (a: number, b: number) => void;
241
+ readonly ts_wasm_store_call_scanner_scan: (a: number, b: number, c: number) => number;
242
+ readonly ts_wasm_store_call_scanner_serialize: (a: number, b: number, c: number) => number;
243
+ readonly ts_wasm_store_call_scanner_deserialize: (a: number, b: number, c: number, d: number) => void;
244
+ readonly ts_language_is_wasm: (a: number) => number;
245
+ readonly ts_wasm_language_release: (a: number) => void;
246
+ readonly ts_wasm_store_call_lex_main: (a: number, b: number) => number;
247
+ readonly ts_wasm_store_reset: (a: number) => void;
248
+ readonly ts_wasm_store_has_error: (a: number) => number;
249
+ readonly ts_wasm_store_delete: (a: number) => void;
250
+ readonly ts_wasm_language_retain: (a: number) => void;
251
+ readonly ts_language_copy: (a: number) => number;
252
+ readonly ts_language_delete: (a: number) => void;
253
+ readonly ts_language_symbol_count: (a: number) => number;
254
+ readonly ts_language_state_count: (a: number) => number;
255
+ readonly ts_language_supertypes: (a: number, b: number) => number;
256
+ readonly ts_language_subtypes: (a: number, b: number, c: number) => number;
257
+ readonly ts_language_abi_version: (a: number) => number;
258
+ readonly ts_language_metadata: (a: number) => number;
259
+ readonly ts_language_name: (a: number) => number;
260
+ readonly ts_language_field_count: (a: number) => number;
261
+ readonly ts_language_lex_mode_for_state: (a: number, b: number, c: number) => void;
262
+ readonly ts_language_symbol_metadata: (a: number, b: number, c: number) => void;
263
+ readonly ts_language_public_symbol: (a: number, b: number) => number;
264
+ readonly ts_language_symbol_name: (a: number, b: number) => number;
265
+ readonly ts_language_field_name_for_id: (a: number, b: number) => number;
266
+ readonly ts_lookahead_iterator_current_symbol: (a: number) => number;
267
+ readonly ts_language_version: (a: number) => number;
268
+ readonly ts_lookahead_iterator_language: (a: number) => number;
269
+ readonly ts_lexer_set_input: (a: number, b: number, c: number, d: number, e: number) => void;
270
+ readonly ts_lexer_reset: (a: number, b: number, c: number, d: number) => void;
271
+ readonly ts_lexer_mark_end: (a: number) => void;
272
+ readonly ts_lexer_included_ranges: (a: number, b: number) => number;
273
+ readonly __wbindgen_exn_store: (a: number) => void;
274
+ readonly __externref_table_alloc: () => number;
275
+ readonly __wbindgen_export_2: WebAssembly.Table;
276
+ readonly __wbindgen_export_3: WebAssembly.Table;
277
+ readonly __wbindgen_malloc: (a: number, b: number) => number;
278
+ readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
279
+ readonly __externref_table_dealloc: (a: number) => void;
280
+ readonly __wbindgen_free: (a: number, b: number, c: number) => void;
281
+ readonly closure236_externref_shim: (a: number, b: number, c: any) => void;
282
+ readonly closure249_externref_shim: (a: number, b: number, c: any, d: any) => void;
283
+ readonly __wbindgen_start: () => void;
284
+ }
285
+
286
+ export type SyncInitInput = BufferSource | WebAssembly.Module;
287
+ /**
288
+ * Instantiates the given `module`, which can either be bytes or
289
+ * a precompiled `WebAssembly.Module`.
290
+ *
291
+ * @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
292
+ *
293
+ * @returns {InitOutput}
294
+ */
295
+ export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
296
+
297
+ /**
298
+ * If `module_or_path` is {RequestInfo} or {URL}, makes a request and
299
+ * for everything else, calls `WebAssembly.instantiate` directly.
300
+ *
301
+ * @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
302
+ *
303
+ * @returns {Promise<InitOutput>}
304
+ */
305
+ export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;
package/qlue_ls.js CHANGED
@@ -1,5 +1,496 @@
1
- import * as wasm from "./qlue_ls_bg.wasm";
2
- export * from "./qlue_ls_bg.js";
3
- import { __wbg_set_wasm } from "./qlue_ls_bg.js";
4
- __wbg_set_wasm(wasm);
5
- wasm.__wbindgen_start();
1
+ let wasm;
2
+
3
+ function addToExternrefTable0(obj) {
4
+ const idx = wasm.__externref_table_alloc();
5
+ wasm.__wbindgen_export_2.set(idx, obj);
6
+ return idx;
7
+ }
8
+
9
+ function handleError(f, args) {
10
+ try {
11
+ return f.apply(this, args);
12
+ } catch (e) {
13
+ const idx = addToExternrefTable0(e);
14
+ wasm.__wbindgen_exn_store(idx);
15
+ }
16
+ }
17
+
18
+ const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
19
+
20
+ if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
21
+
22
+ let cachedUint8ArrayMemory0 = null;
23
+
24
+ function getUint8ArrayMemory0() {
25
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
26
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
27
+ }
28
+ return cachedUint8ArrayMemory0;
29
+ }
30
+
31
+ function getStringFromWasm0(ptr, len) {
32
+ ptr = ptr >>> 0;
33
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
34
+ }
35
+
36
+ function isLikeNone(x) {
37
+ return x === undefined || x === null;
38
+ }
39
+
40
+ const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
41
+ ? { register: () => {}, unregister: () => {} }
42
+ : new FinalizationRegistry(state => {
43
+ wasm.__wbindgen_export_3.get(state.dtor)(state.a, state.b)
44
+ });
45
+
46
+ function makeMutClosure(arg0, arg1, dtor, f) {
47
+ const state = { a: arg0, b: arg1, cnt: 1, dtor };
48
+ const real = (...args) => {
49
+ // First up with a closure we increment the internal reference
50
+ // count. This ensures that the Rust closure environment won't
51
+ // be deallocated while we're invoking it.
52
+ state.cnt++;
53
+ const a = state.a;
54
+ state.a = 0;
55
+ try {
56
+ return f(a, state.b, ...args);
57
+ } finally {
58
+ if (--state.cnt === 0) {
59
+ wasm.__wbindgen_export_3.get(state.dtor)(a, state.b);
60
+ CLOSURE_DTORS.unregister(state);
61
+ } else {
62
+ state.a = a;
63
+ }
64
+ }
65
+ };
66
+ real.original = state;
67
+ CLOSURE_DTORS.register(real, state, state);
68
+ return real;
69
+ }
70
+
71
+ let WASM_VECTOR_LEN = 0;
72
+
73
+ const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } );
74
+
75
+ const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
76
+ ? function (arg, view) {
77
+ return cachedTextEncoder.encodeInto(arg, view);
78
+ }
79
+ : function (arg, view) {
80
+ const buf = cachedTextEncoder.encode(arg);
81
+ view.set(buf);
82
+ return {
83
+ read: arg.length,
84
+ written: buf.length
85
+ };
86
+ });
87
+
88
+ function passStringToWasm0(arg, malloc, realloc) {
89
+
90
+ if (realloc === undefined) {
91
+ const buf = cachedTextEncoder.encode(arg);
92
+ const ptr = malloc(buf.length, 1) >>> 0;
93
+ getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
94
+ WASM_VECTOR_LEN = buf.length;
95
+ return ptr;
96
+ }
97
+
98
+ let len = arg.length;
99
+ let ptr = malloc(len, 1) >>> 0;
100
+
101
+ const mem = getUint8ArrayMemory0();
102
+
103
+ let offset = 0;
104
+
105
+ for (; offset < len; offset++) {
106
+ const code = arg.charCodeAt(offset);
107
+ if (code > 0x7F) break;
108
+ mem[ptr + offset] = code;
109
+ }
110
+
111
+ if (offset !== len) {
112
+ if (offset !== 0) {
113
+ arg = arg.slice(offset);
114
+ }
115
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
116
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
117
+ const ret = encodeString(arg, view);
118
+
119
+ offset += ret.written;
120
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
121
+ }
122
+
123
+ WASM_VECTOR_LEN = offset;
124
+ return ptr;
125
+ }
126
+
127
+ let cachedDataViewMemory0 = null;
128
+
129
+ function getDataViewMemory0() {
130
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
131
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
132
+ }
133
+ return cachedDataViewMemory0;
134
+ }
135
+
136
+ function takeFromExternrefTable0(idx) {
137
+ const value = wasm.__wbindgen_export_2.get(idx);
138
+ wasm.__externref_table_dealloc(idx);
139
+ return value;
140
+ }
141
+ /**
142
+ * @param {string} text
143
+ * @returns {string}
144
+ */
145
+ export function format_raw(text) {
146
+ let deferred3_0;
147
+ let deferred3_1;
148
+ try {
149
+ const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
150
+ const len0 = WASM_VECTOR_LEN;
151
+ const ret = wasm.format_raw(ptr0, len0);
152
+ var ptr2 = ret[0];
153
+ var len2 = ret[1];
154
+ if (ret[3]) {
155
+ ptr2 = 0; len2 = 0;
156
+ throw takeFromExternrefTable0(ret[2]);
157
+ }
158
+ deferred3_0 = ptr2;
159
+ deferred3_1 = len2;
160
+ return getStringFromWasm0(ptr2, len2);
161
+ } finally {
162
+ wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
163
+ }
164
+ }
165
+
166
+ /**
167
+ * @param {string} text
168
+ * @returns {string}
169
+ */
170
+ export function determine_operation_type(text) {
171
+ let deferred3_0;
172
+ let deferred3_1;
173
+ try {
174
+ const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
175
+ const len0 = WASM_VECTOR_LEN;
176
+ const ret = wasm.determine_operation_type(ptr0, len0);
177
+ var ptr2 = ret[0];
178
+ var len2 = ret[1];
179
+ if (ret[3]) {
180
+ ptr2 = 0; len2 = 0;
181
+ throw takeFromExternrefTable0(ret[2]);
182
+ }
183
+ deferred3_0 = ptr2;
184
+ deferred3_1 = len2;
185
+ return getStringFromWasm0(ptr2, len2);
186
+ } finally {
187
+ wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
188
+ }
189
+ }
190
+
191
+ /**
192
+ * @param {WritableStreamDefaultWriter} writer
193
+ * @returns {Server}
194
+ */
195
+ export function init_language_server(writer) {
196
+ const ret = wasm.init_language_server(writer);
197
+ return Server.__wrap(ret);
198
+ }
199
+
200
+ function __wbg_adapter_22(arg0, arg1, arg2) {
201
+ wasm.closure236_externref_shim(arg0, arg1, arg2);
202
+ }
203
+
204
+ function __wbg_adapter_53(arg0, arg1, arg2, arg3) {
205
+ wasm.closure249_externref_shim(arg0, arg1, arg2, arg3);
206
+ }
207
+
208
+ const ServerFinalization = (typeof FinalizationRegistry === 'undefined')
209
+ ? { register: () => {}, unregister: () => {} }
210
+ : new FinalizationRegistry(ptr => wasm.__wbg_server_free(ptr >>> 0, 1));
211
+
212
+ export class Server {
213
+
214
+ static __wrap(ptr) {
215
+ ptr = ptr >>> 0;
216
+ const obj = Object.create(Server.prototype);
217
+ obj.__wbg_ptr = ptr;
218
+ ServerFinalization.register(obj, obj.__wbg_ptr, obj);
219
+ return obj;
220
+ }
221
+
222
+ __destroy_into_raw() {
223
+ const ptr = this.__wbg_ptr;
224
+ this.__wbg_ptr = 0;
225
+ ServerFinalization.unregister(this);
226
+ return ptr;
227
+ }
228
+
229
+ free() {
230
+ const ptr = this.__destroy_into_raw();
231
+ wasm.__wbg_server_free(ptr, 0);
232
+ }
233
+ /**
234
+ * @param {ReadableStreamDefaultReader} reader
235
+ * @returns {Promise<void>}
236
+ */
237
+ listen(reader) {
238
+ const ret = wasm.server_listen(this.__wbg_ptr, reader);
239
+ return ret;
240
+ }
241
+ }
242
+
243
+ async function __wbg_load(module, imports) {
244
+ if (typeof Response === 'function' && module instanceof Response) {
245
+ if (typeof WebAssembly.instantiateStreaming === 'function') {
246
+ try {
247
+ return await WebAssembly.instantiateStreaming(module, imports);
248
+
249
+ } catch (e) {
250
+ if (module.headers.get('Content-Type') != 'application/wasm') {
251
+ console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
252
+
253
+ } else {
254
+ throw e;
255
+ }
256
+ }
257
+ }
258
+
259
+ const bytes = await module.arrayBuffer();
260
+ return await WebAssembly.instantiate(bytes, imports);
261
+
262
+ } else {
263
+ const instance = await WebAssembly.instantiate(module, imports);
264
+
265
+ if (instance instanceof WebAssembly.Instance) {
266
+ return { instance, module };
267
+
268
+ } else {
269
+ return instance;
270
+ }
271
+ }
272
+ }
273
+
274
+ function __wbg_get_imports() {
275
+ const imports = {};
276
+ imports.wbg = {};
277
+ imports.wbg.__wbg_call_500db948e69c7330 = function() { return handleError(function (arg0, arg1, arg2) {
278
+ const ret = arg0.call(arg1, arg2);
279
+ return ret;
280
+ }, arguments) };
281
+ imports.wbg.__wbg_call_b0d8e36992d9900d = function() { return handleError(function (arg0, arg1) {
282
+ const ret = arg0.call(arg1);
283
+ return ret;
284
+ }, arguments) };
285
+ imports.wbg.__wbg_debug_19114f11037e4658 = function(arg0, arg1, arg2, arg3) {
286
+ console.debug(arg0, arg1, arg2, arg3);
287
+ };
288
+ imports.wbg.__wbg_error_483d659117b6f3f6 = function(arg0, arg1, arg2, arg3) {
289
+ console.error(arg0, arg1, arg2, arg3);
290
+ };
291
+ imports.wbg.__wbg_error_fab41a42d22bf2bc = function(arg0) {
292
+ console.error(arg0);
293
+ };
294
+ imports.wbg.__wbg_get_bbccf8970793c087 = function() { return handleError(function (arg0, arg1) {
295
+ const ret = Reflect.get(arg0, arg1);
296
+ return ret;
297
+ }, arguments) };
298
+ imports.wbg.__wbg_info_18e75e6ce8a36a90 = function(arg0, arg1, arg2, arg3) {
299
+ console.info(arg0, arg1, arg2, arg3);
300
+ };
301
+ imports.wbg.__wbg_log_bc77772961bf21bb = function(arg0, arg1, arg2, arg3) {
302
+ console.log(arg0, arg1, arg2, arg3);
303
+ };
304
+ imports.wbg.__wbg_new_3d446df9155128ef = function(arg0, arg1) {
305
+ try {
306
+ var state0 = {a: arg0, b: arg1};
307
+ var cb0 = (arg0, arg1) => {
308
+ const a = state0.a;
309
+ state0.a = 0;
310
+ try {
311
+ return __wbg_adapter_53(a, state0.b, arg0, arg1);
312
+ } finally {
313
+ state0.a = a;
314
+ }
315
+ };
316
+ const ret = new Promise(cb0);
317
+ return ret;
318
+ } finally {
319
+ state0.a = state0.b = 0;
320
+ }
321
+ };
322
+ imports.wbg.__wbg_newnoargs_fd9e4bf8be2bc16d = function(arg0, arg1) {
323
+ const ret = new Function(getStringFromWasm0(arg0, arg1));
324
+ return ret;
325
+ };
326
+ imports.wbg.__wbg_queueMicrotask_2181040e064c0dc8 = function(arg0) {
327
+ queueMicrotask(arg0);
328
+ };
329
+ imports.wbg.__wbg_queueMicrotask_ef9ac43769cbcc4f = function(arg0) {
330
+ const ret = arg0.queueMicrotask;
331
+ return ret;
332
+ };
333
+ imports.wbg.__wbg_read_4d173e86f707008c = function(arg0) {
334
+ const ret = arg0.read();
335
+ return ret;
336
+ };
337
+ imports.wbg.__wbg_resolve_0bf7c44d641804f9 = function(arg0) {
338
+ const ret = Promise.resolve(arg0);
339
+ return ret;
340
+ };
341
+ imports.wbg.__wbg_static_accessor_GLOBAL_0be7472e492ad3e3 = function() {
342
+ const ret = typeof global === 'undefined' ? null : global;
343
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
344
+ };
345
+ imports.wbg.__wbg_static_accessor_GLOBAL_THIS_1a6eb482d12c9bfb = function() {
346
+ const ret = typeof globalThis === 'undefined' ? null : globalThis;
347
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
348
+ };
349
+ imports.wbg.__wbg_static_accessor_SELF_1dc398a895c82351 = function() {
350
+ const ret = typeof self === 'undefined' ? null : self;
351
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
352
+ };
353
+ imports.wbg.__wbg_static_accessor_WINDOW_ae1c80c7eea8d64a = function() {
354
+ const ret = typeof window === 'undefined' ? null : window;
355
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
356
+ };
357
+ imports.wbg.__wbg_then_0438fad860fe38e1 = function(arg0, arg1) {
358
+ const ret = arg0.then(arg1);
359
+ return ret;
360
+ };
361
+ imports.wbg.__wbg_then_0ffafeddf0e182a4 = function(arg0, arg1, arg2) {
362
+ const ret = arg0.then(arg1, arg2);
363
+ return ret;
364
+ };
365
+ imports.wbg.__wbg_warn_cb8be8bbf790a5d6 = function(arg0, arg1, arg2, arg3) {
366
+ console.warn(arg0, arg1, arg2, arg3);
367
+ };
368
+ imports.wbg.__wbg_write_0aea81ae26043440 = function(arg0, arg1) {
369
+ const ret = arg0.write(arg1);
370
+ return ret;
371
+ };
372
+ imports.wbg.__wbindgen_boolean_get = function(arg0) {
373
+ const v = arg0;
374
+ const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
375
+ return ret;
376
+ };
377
+ imports.wbg.__wbindgen_cb_drop = function(arg0) {
378
+ const obj = arg0.original;
379
+ if (obj.cnt-- == 1) {
380
+ obj.a = 0;
381
+ return true;
382
+ }
383
+ const ret = false;
384
+ return ret;
385
+ };
386
+ imports.wbg.__wbindgen_closure_wrapper1294 = function(arg0, arg1, arg2) {
387
+ const ret = makeMutClosure(arg0, arg1, 237, __wbg_adapter_22);
388
+ return ret;
389
+ };
390
+ imports.wbg.__wbindgen_init_externref_table = function() {
391
+ const table = wasm.__wbindgen_export_2;
392
+ const offset = table.grow(4);
393
+ table.set(0, undefined);
394
+ table.set(offset + 0, undefined);
395
+ table.set(offset + 1, null);
396
+ table.set(offset + 2, true);
397
+ table.set(offset + 3, false);
398
+ ;
399
+ };
400
+ imports.wbg.__wbindgen_is_function = function(arg0) {
401
+ const ret = typeof(arg0) === 'function';
402
+ return ret;
403
+ };
404
+ imports.wbg.__wbindgen_is_undefined = function(arg0) {
405
+ const ret = arg0 === undefined;
406
+ return ret;
407
+ };
408
+ imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
409
+ const obj = arg1;
410
+ const ret = typeof(obj) === 'string' ? obj : undefined;
411
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
412
+ var len1 = WASM_VECTOR_LEN;
413
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
414
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
415
+ };
416
+ imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
417
+ const ret = getStringFromWasm0(arg0, arg1);
418
+ return ret;
419
+ };
420
+ imports.wbg.__wbindgen_throw = function(arg0, arg1) {
421
+ throw new Error(getStringFromWasm0(arg0, arg1));
422
+ };
423
+
424
+ return imports;
425
+ }
426
+
427
+ function __wbg_init_memory(imports, memory) {
428
+
429
+ }
430
+
431
+ function __wbg_finalize_init(instance, module) {
432
+ wasm = instance.exports;
433
+ __wbg_init.__wbindgen_wasm_module = module;
434
+ cachedDataViewMemory0 = null;
435
+ cachedUint8ArrayMemory0 = null;
436
+
437
+
438
+ wasm.__wbindgen_start();
439
+ return wasm;
440
+ }
441
+
442
+ function initSync(module) {
443
+ if (wasm !== undefined) return wasm;
444
+
445
+
446
+ if (typeof module !== 'undefined') {
447
+ if (Object.getPrototypeOf(module) === Object.prototype) {
448
+ ({module} = module)
449
+ } else {
450
+ console.warn('using deprecated parameters for `initSync()`; pass a single object instead')
451
+ }
452
+ }
453
+
454
+ const imports = __wbg_get_imports();
455
+
456
+ __wbg_init_memory(imports);
457
+
458
+ if (!(module instanceof WebAssembly.Module)) {
459
+ module = new WebAssembly.Module(module);
460
+ }
461
+
462
+ const instance = new WebAssembly.Instance(module, imports);
463
+
464
+ return __wbg_finalize_init(instance, module);
465
+ }
466
+
467
+ async function __wbg_init(module_or_path) {
468
+ if (wasm !== undefined) return wasm;
469
+
470
+
471
+ if (typeof module_or_path !== 'undefined') {
472
+ if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
473
+ ({module_or_path} = module_or_path)
474
+ } else {
475
+ console.warn('using deprecated parameters for the initialization function; pass a single object instead')
476
+ }
477
+ }
478
+
479
+ if (typeof module_or_path === 'undefined') {
480
+ module_or_path = new URL('qlue_ls_bg.wasm', import.meta.url);
481
+ }
482
+ const imports = __wbg_get_imports();
483
+
484
+ if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
485
+ module_or_path = fetch(module_or_path);
486
+ }
487
+
488
+ __wbg_init_memory(imports);
489
+
490
+ const { instance, module } = await __wbg_load(await module_or_path, imports);
491
+
492
+ return __wbg_finalize_init(instance, module);
493
+ }
494
+
495
+ export { initSync };
496
+ export default __wbg_init;
package/qlue_ls_bg.wasm CHANGED
Binary file
package/qlue_ls_bg.js DELETED
@@ -1,402 +0,0 @@
1
- let wasm;
2
- export function __wbg_set_wasm(val) {
3
- wasm = val;
4
- }
5
-
6
-
7
- function addToExternrefTable0(obj) {
8
- const idx = wasm.__externref_table_alloc();
9
- wasm.__wbindgen_export_2.set(idx, obj);
10
- return idx;
11
- }
12
-
13
- function handleError(f, args) {
14
- try {
15
- return f.apply(this, args);
16
- } catch (e) {
17
- const idx = addToExternrefTable0(e);
18
- wasm.__wbindgen_exn_store(idx);
19
- }
20
- }
21
-
22
- const lTextDecoder = typeof TextDecoder === 'undefined' ? (0, module.require)('util').TextDecoder : TextDecoder;
23
-
24
- let cachedTextDecoder = new lTextDecoder('utf-8', { ignoreBOM: true, fatal: true });
25
-
26
- cachedTextDecoder.decode();
27
-
28
- let cachedUint8ArrayMemory0 = null;
29
-
30
- function getUint8ArrayMemory0() {
31
- if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
32
- cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
33
- }
34
- return cachedUint8ArrayMemory0;
35
- }
36
-
37
- function getStringFromWasm0(ptr, len) {
38
- ptr = ptr >>> 0;
39
- return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
40
- }
41
-
42
- function isLikeNone(x) {
43
- return x === undefined || x === null;
44
- }
45
-
46
- const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
47
- ? { register: () => {}, unregister: () => {} }
48
- : new FinalizationRegistry(state => {
49
- wasm.__wbindgen_export_3.get(state.dtor)(state.a, state.b)
50
- });
51
-
52
- function makeMutClosure(arg0, arg1, dtor, f) {
53
- const state = { a: arg0, b: arg1, cnt: 1, dtor };
54
- const real = (...args) => {
55
- // First up with a closure we increment the internal reference
56
- // count. This ensures that the Rust closure environment won't
57
- // be deallocated while we're invoking it.
58
- state.cnt++;
59
- const a = state.a;
60
- state.a = 0;
61
- try {
62
- return f(a, state.b, ...args);
63
- } finally {
64
- if (--state.cnt === 0) {
65
- wasm.__wbindgen_export_3.get(state.dtor)(a, state.b);
66
- CLOSURE_DTORS.unregister(state);
67
- } else {
68
- state.a = a;
69
- }
70
- }
71
- };
72
- real.original = state;
73
- CLOSURE_DTORS.register(real, state, state);
74
- return real;
75
- }
76
-
77
- let WASM_VECTOR_LEN = 0;
78
-
79
- const lTextEncoder = typeof TextEncoder === 'undefined' ? (0, module.require)('util').TextEncoder : TextEncoder;
80
-
81
- let cachedTextEncoder = new lTextEncoder('utf-8');
82
-
83
- const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
84
- ? function (arg, view) {
85
- return cachedTextEncoder.encodeInto(arg, view);
86
- }
87
- : function (arg, view) {
88
- const buf = cachedTextEncoder.encode(arg);
89
- view.set(buf);
90
- return {
91
- read: arg.length,
92
- written: buf.length
93
- };
94
- });
95
-
96
- function passStringToWasm0(arg, malloc, realloc) {
97
-
98
- if (realloc === undefined) {
99
- const buf = cachedTextEncoder.encode(arg);
100
- const ptr = malloc(buf.length, 1) >>> 0;
101
- getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
102
- WASM_VECTOR_LEN = buf.length;
103
- return ptr;
104
- }
105
-
106
- let len = arg.length;
107
- let ptr = malloc(len, 1) >>> 0;
108
-
109
- const mem = getUint8ArrayMemory0();
110
-
111
- let offset = 0;
112
-
113
- for (; offset < len; offset++) {
114
- const code = arg.charCodeAt(offset);
115
- if (code > 0x7F) break;
116
- mem[ptr + offset] = code;
117
- }
118
-
119
- if (offset !== len) {
120
- if (offset !== 0) {
121
- arg = arg.slice(offset);
122
- }
123
- ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
124
- const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
125
- const ret = encodeString(arg, view);
126
-
127
- offset += ret.written;
128
- ptr = realloc(ptr, len, offset, 1) >>> 0;
129
- }
130
-
131
- WASM_VECTOR_LEN = offset;
132
- return ptr;
133
- }
134
-
135
- let cachedDataViewMemory0 = null;
136
-
137
- function getDataViewMemory0() {
138
- if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
139
- cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
140
- }
141
- return cachedDataViewMemory0;
142
- }
143
-
144
- function takeFromExternrefTable0(idx) {
145
- const value = wasm.__wbindgen_export_2.get(idx);
146
- wasm.__externref_table_dealloc(idx);
147
- return value;
148
- }
149
- /**
150
- * @param {string} text
151
- * @returns {string}
152
- */
153
- export function format_raw(text) {
154
- let deferred3_0;
155
- let deferred3_1;
156
- try {
157
- const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
158
- const len0 = WASM_VECTOR_LEN;
159
- const ret = wasm.format_raw(ptr0, len0);
160
- var ptr2 = ret[0];
161
- var len2 = ret[1];
162
- if (ret[3]) {
163
- ptr2 = 0; len2 = 0;
164
- throw takeFromExternrefTable0(ret[2]);
165
- }
166
- deferred3_0 = ptr2;
167
- deferred3_1 = len2;
168
- return getStringFromWasm0(ptr2, len2);
169
- } finally {
170
- wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
171
- }
172
- }
173
-
174
- /**
175
- * @param {WritableStreamDefaultWriter} writer
176
- * @returns {Server}
177
- */
178
- export function init_language_server(writer) {
179
- const ret = wasm.init_language_server(writer);
180
- return Server.__wrap(ret);
181
- }
182
-
183
- function __wbg_adapter_22(arg0, arg1, arg2) {
184
- wasm.closure231_externref_shim(arg0, arg1, arg2);
185
- }
186
-
187
- function __wbg_adapter_52(arg0, arg1, arg2, arg3) {
188
- wasm.closure244_externref_shim(arg0, arg1, arg2, arg3);
189
- }
190
-
191
- const ServerFinalization = (typeof FinalizationRegistry === 'undefined')
192
- ? { register: () => {}, unregister: () => {} }
193
- : new FinalizationRegistry(ptr => wasm.__wbg_server_free(ptr >>> 0, 1));
194
-
195
- export class Server {
196
-
197
- static __wrap(ptr) {
198
- ptr = ptr >>> 0;
199
- const obj = Object.create(Server.prototype);
200
- obj.__wbg_ptr = ptr;
201
- ServerFinalization.register(obj, obj.__wbg_ptr, obj);
202
- return obj;
203
- }
204
-
205
- __destroy_into_raw() {
206
- const ptr = this.__wbg_ptr;
207
- this.__wbg_ptr = 0;
208
- ServerFinalization.unregister(this);
209
- return ptr;
210
- }
211
-
212
- free() {
213
- const ptr = this.__destroy_into_raw();
214
- wasm.__wbg_server_free(ptr, 0);
215
- }
216
- /**
217
- * @param {ReadableStreamDefaultReader} reader
218
- * @returns {Promise<void>}
219
- */
220
- listen(reader) {
221
- const ret = wasm.server_listen(this.__wbg_ptr, reader);
222
- return ret;
223
- }
224
- }
225
-
226
- export function __wbg_call_500db948e69c7330() { return handleError(function (arg0, arg1, arg2) {
227
- const ret = arg0.call(arg1, arg2);
228
- return ret;
229
- }, arguments) };
230
-
231
- export function __wbg_call_b0d8e36992d9900d() { return handleError(function (arg0, arg1) {
232
- const ret = arg0.call(arg1);
233
- return ret;
234
- }, arguments) };
235
-
236
- export function __wbg_debug_19114f11037e4658(arg0, arg1, arg2, arg3) {
237
- console.debug(arg0, arg1, arg2, arg3);
238
- };
239
-
240
- export function __wbg_error_483d659117b6f3f6(arg0, arg1, arg2, arg3) {
241
- console.error(arg0, arg1, arg2, arg3);
242
- };
243
-
244
- export function __wbg_error_fab41a42d22bf2bc(arg0) {
245
- console.error(arg0);
246
- };
247
-
248
- export function __wbg_get_bbccf8970793c087() { return handleError(function (arg0, arg1) {
249
- const ret = Reflect.get(arg0, arg1);
250
- return ret;
251
- }, arguments) };
252
-
253
- export function __wbg_info_18e75e6ce8a36a90(arg0, arg1, arg2, arg3) {
254
- console.info(arg0, arg1, arg2, arg3);
255
- };
256
-
257
- export function __wbg_log_bc77772961bf21bb(arg0, arg1, arg2, arg3) {
258
- console.log(arg0, arg1, arg2, arg3);
259
- };
260
-
261
- export function __wbg_new_3d446df9155128ef(arg0, arg1) {
262
- try {
263
- var state0 = {a: arg0, b: arg1};
264
- var cb0 = (arg0, arg1) => {
265
- const a = state0.a;
266
- state0.a = 0;
267
- try {
268
- return __wbg_adapter_52(a, state0.b, arg0, arg1);
269
- } finally {
270
- state0.a = a;
271
- }
272
- };
273
- const ret = new Promise(cb0);
274
- return ret;
275
- } finally {
276
- state0.a = state0.b = 0;
277
- }
278
- };
279
-
280
- export function __wbg_newnoargs_fd9e4bf8be2bc16d(arg0, arg1) {
281
- const ret = new Function(getStringFromWasm0(arg0, arg1));
282
- return ret;
283
- };
284
-
285
- export function __wbg_queueMicrotask_2181040e064c0dc8(arg0) {
286
- queueMicrotask(arg0);
287
- };
288
-
289
- export function __wbg_queueMicrotask_ef9ac43769cbcc4f(arg0) {
290
- const ret = arg0.queueMicrotask;
291
- return ret;
292
- };
293
-
294
- export function __wbg_read_4d173e86f707008c(arg0) {
295
- const ret = arg0.read();
296
- return ret;
297
- };
298
-
299
- export function __wbg_resolve_0bf7c44d641804f9(arg0) {
300
- const ret = Promise.resolve(arg0);
301
- return ret;
302
- };
303
-
304
- export function __wbg_static_accessor_GLOBAL_0be7472e492ad3e3() {
305
- const ret = typeof global === 'undefined' ? null : global;
306
- return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
307
- };
308
-
309
- export function __wbg_static_accessor_GLOBAL_THIS_1a6eb482d12c9bfb() {
310
- const ret = typeof globalThis === 'undefined' ? null : globalThis;
311
- return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
312
- };
313
-
314
- export function __wbg_static_accessor_SELF_1dc398a895c82351() {
315
- const ret = typeof self === 'undefined' ? null : self;
316
- return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
317
- };
318
-
319
- export function __wbg_static_accessor_WINDOW_ae1c80c7eea8d64a() {
320
- const ret = typeof window === 'undefined' ? null : window;
321
- return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
322
- };
323
-
324
- export function __wbg_then_0438fad860fe38e1(arg0, arg1) {
325
- const ret = arg0.then(arg1);
326
- return ret;
327
- };
328
-
329
- export function __wbg_then_0ffafeddf0e182a4(arg0, arg1, arg2) {
330
- const ret = arg0.then(arg1, arg2);
331
- return ret;
332
- };
333
-
334
- export function __wbg_warn_cb8be8bbf790a5d6(arg0, arg1, arg2, arg3) {
335
- console.warn(arg0, arg1, arg2, arg3);
336
- };
337
-
338
- export function __wbg_write_0aea81ae26043440(arg0, arg1) {
339
- const ret = arg0.write(arg1);
340
- return ret;
341
- };
342
-
343
- export function __wbindgen_boolean_get(arg0) {
344
- const v = arg0;
345
- const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
346
- return ret;
347
- };
348
-
349
- export function __wbindgen_cb_drop(arg0) {
350
- const obj = arg0.original;
351
- if (obj.cnt-- == 1) {
352
- obj.a = 0;
353
- return true;
354
- }
355
- const ret = false;
356
- return ret;
357
- };
358
-
359
- export function __wbindgen_closure_wrapper1067(arg0, arg1, arg2) {
360
- const ret = makeMutClosure(arg0, arg1, 232, __wbg_adapter_22);
361
- return ret;
362
- };
363
-
364
- export function __wbindgen_init_externref_table() {
365
- const table = wasm.__wbindgen_export_2;
366
- const offset = table.grow(4);
367
- table.set(0, undefined);
368
- table.set(offset + 0, undefined);
369
- table.set(offset + 1, null);
370
- table.set(offset + 2, true);
371
- table.set(offset + 3, false);
372
- ;
373
- };
374
-
375
- export function __wbindgen_is_function(arg0) {
376
- const ret = typeof(arg0) === 'function';
377
- return ret;
378
- };
379
-
380
- export function __wbindgen_is_undefined(arg0) {
381
- const ret = arg0 === undefined;
382
- return ret;
383
- };
384
-
385
- export function __wbindgen_string_get(arg0, arg1) {
386
- const obj = arg1;
387
- const ret = typeof(obj) === 'string' ? obj : undefined;
388
- var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
389
- var len1 = WASM_VECTOR_LEN;
390
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
391
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
392
- };
393
-
394
- export function __wbindgen_string_new(arg0, arg1) {
395
- const ret = getStringFromWasm0(arg0, arg1);
396
- return ret;
397
- };
398
-
399
- export function __wbindgen_throw(arg0, arg1) {
400
- throw new Error(getStringFromWasm0(arg0, arg1));
401
- };
402
-