qlue-ls 0.3.5 → 0.4.1
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 +1 -1
- package/qlue_ls.d.ts +2 -0
- package/qlue_ls_bg.js +163 -33
- package/qlue_ls_bg.wasm +0 -0
package/package.json
CHANGED
package/qlue_ls.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
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;
|
|
6
|
+
export function get_parse_tree(input: string, offset: number): any;
|
|
5
7
|
export class Server {
|
|
6
8
|
private constructor();
|
|
7
9
|
free(): void;
|
package/qlue_ls_bg.js
CHANGED
|
@@ -74,6 +74,71 @@ function makeMutClosure(arg0, arg1, dtor, f) {
|
|
|
74
74
|
return real;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
+
function debugString(val) {
|
|
78
|
+
// primitive types
|
|
79
|
+
const type = typeof val;
|
|
80
|
+
if (type == 'number' || type == 'boolean' || val == null) {
|
|
81
|
+
return `${val}`;
|
|
82
|
+
}
|
|
83
|
+
if (type == 'string') {
|
|
84
|
+
return `"${val}"`;
|
|
85
|
+
}
|
|
86
|
+
if (type == 'symbol') {
|
|
87
|
+
const description = val.description;
|
|
88
|
+
if (description == null) {
|
|
89
|
+
return 'Symbol';
|
|
90
|
+
} else {
|
|
91
|
+
return `Symbol(${description})`;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
if (type == 'function') {
|
|
95
|
+
const name = val.name;
|
|
96
|
+
if (typeof name == 'string' && name.length > 0) {
|
|
97
|
+
return `Function(${name})`;
|
|
98
|
+
} else {
|
|
99
|
+
return 'Function';
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
// objects
|
|
103
|
+
if (Array.isArray(val)) {
|
|
104
|
+
const length = val.length;
|
|
105
|
+
let debug = '[';
|
|
106
|
+
if (length > 0) {
|
|
107
|
+
debug += debugString(val[0]);
|
|
108
|
+
}
|
|
109
|
+
for(let i = 1; i < length; i++) {
|
|
110
|
+
debug += ', ' + debugString(val[i]);
|
|
111
|
+
}
|
|
112
|
+
debug += ']';
|
|
113
|
+
return debug;
|
|
114
|
+
}
|
|
115
|
+
// Test for built-in
|
|
116
|
+
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
117
|
+
let className;
|
|
118
|
+
if (builtInMatches && builtInMatches.length > 1) {
|
|
119
|
+
className = builtInMatches[1];
|
|
120
|
+
} else {
|
|
121
|
+
// Failed to match the standard '[object ClassName]'
|
|
122
|
+
return toString.call(val);
|
|
123
|
+
}
|
|
124
|
+
if (className == 'Object') {
|
|
125
|
+
// we're a user defined class or Object
|
|
126
|
+
// JSON.stringify avoids problems with cycles, and is generally much
|
|
127
|
+
// easier than looping through ownProperties of `val`.
|
|
128
|
+
try {
|
|
129
|
+
return 'Object(' + JSON.stringify(val) + ')';
|
|
130
|
+
} catch (_) {
|
|
131
|
+
return 'Object';
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
// errors
|
|
135
|
+
if (val instanceof Error) {
|
|
136
|
+
return `${val.name}: ${val.message}\n${val.stack}`;
|
|
137
|
+
}
|
|
138
|
+
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
139
|
+
return className;
|
|
140
|
+
}
|
|
141
|
+
|
|
77
142
|
let WASM_VECTOR_LEN = 0;
|
|
78
143
|
|
|
79
144
|
const lTextEncoder = typeof TextEncoder === 'undefined' ? (0, module.require)('util').TextEncoder : TextEncoder;
|
|
@@ -171,6 +236,31 @@ export function format_raw(text) {
|
|
|
171
236
|
}
|
|
172
237
|
}
|
|
173
238
|
|
|
239
|
+
/**
|
|
240
|
+
* @param {string} text
|
|
241
|
+
* @returns {string}
|
|
242
|
+
*/
|
|
243
|
+
export function determine_operation_type(text) {
|
|
244
|
+
let deferred3_0;
|
|
245
|
+
let deferred3_1;
|
|
246
|
+
try {
|
|
247
|
+
const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
248
|
+
const len0 = WASM_VECTOR_LEN;
|
|
249
|
+
const ret = wasm.determine_operation_type(ptr0, len0);
|
|
250
|
+
var ptr2 = ret[0];
|
|
251
|
+
var len2 = ret[1];
|
|
252
|
+
if (ret[3]) {
|
|
253
|
+
ptr2 = 0; len2 = 0;
|
|
254
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
255
|
+
}
|
|
256
|
+
deferred3_0 = ptr2;
|
|
257
|
+
deferred3_1 = len2;
|
|
258
|
+
return getStringFromWasm0(ptr2, len2);
|
|
259
|
+
} finally {
|
|
260
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
|
|
174
264
|
/**
|
|
175
265
|
* @param {WritableStreamDefaultWriter} writer
|
|
176
266
|
* @returns {Server}
|
|
@@ -180,12 +270,24 @@ export function init_language_server(writer) {
|
|
|
180
270
|
return Server.__wrap(ret);
|
|
181
271
|
}
|
|
182
272
|
|
|
183
|
-
|
|
184
|
-
|
|
273
|
+
/**
|
|
274
|
+
* @param {string} input
|
|
275
|
+
* @param {number} offset
|
|
276
|
+
* @returns {any}
|
|
277
|
+
*/
|
|
278
|
+
export function get_parse_tree(input, offset) {
|
|
279
|
+
const ptr0 = passStringToWasm0(input, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
280
|
+
const len0 = WASM_VECTOR_LEN;
|
|
281
|
+
const ret = wasm.get_parse_tree(ptr0, len0, offset);
|
|
282
|
+
return ret;
|
|
185
283
|
}
|
|
186
284
|
|
|
187
|
-
function
|
|
188
|
-
wasm.
|
|
285
|
+
function __wbg_adapter_24(arg0, arg1, arg2) {
|
|
286
|
+
wasm.closure237_externref_shim(arg0, arg1, arg2);
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
function __wbg_adapter_62(arg0, arg1, arg2, arg3) {
|
|
290
|
+
wasm.closure249_externref_shim(arg0, arg1, arg2, arg3);
|
|
189
291
|
}
|
|
190
292
|
|
|
191
293
|
const ServerFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
@@ -223,49 +325,49 @@ export class Server {
|
|
|
223
325
|
}
|
|
224
326
|
}
|
|
225
327
|
|
|
226
|
-
export function
|
|
227
|
-
const ret = arg0.call(arg1
|
|
328
|
+
export function __wbg_call_672a4d21634d4a24() { return handleError(function (arg0, arg1) {
|
|
329
|
+
const ret = arg0.call(arg1);
|
|
228
330
|
return ret;
|
|
229
331
|
}, arguments) };
|
|
230
332
|
|
|
231
|
-
export function
|
|
232
|
-
const ret = arg0.call(arg1);
|
|
333
|
+
export function __wbg_call_7cccdd69e0791ae2() { return handleError(function (arg0, arg1, arg2) {
|
|
334
|
+
const ret = arg0.call(arg1, arg2);
|
|
233
335
|
return ret;
|
|
234
336
|
}, arguments) };
|
|
235
337
|
|
|
236
|
-
export function
|
|
338
|
+
export function __wbg_debug_e17b51583ca6a632(arg0, arg1, arg2, arg3) {
|
|
237
339
|
console.debug(arg0, arg1, arg2, arg3);
|
|
238
340
|
};
|
|
239
341
|
|
|
240
|
-
export function
|
|
241
|
-
console.error(arg0
|
|
342
|
+
export function __wbg_error_524f506f44df1645(arg0) {
|
|
343
|
+
console.error(arg0);
|
|
242
344
|
};
|
|
243
345
|
|
|
244
|
-
export function
|
|
245
|
-
console.error(arg0);
|
|
346
|
+
export function __wbg_error_80de38b3f7cc3c3c(arg0, arg1, arg2, arg3) {
|
|
347
|
+
console.error(arg0, arg1, arg2, arg3);
|
|
246
348
|
};
|
|
247
349
|
|
|
248
|
-
export function
|
|
350
|
+
export function __wbg_get_67b2ba62fc30de12() { return handleError(function (arg0, arg1) {
|
|
249
351
|
const ret = Reflect.get(arg0, arg1);
|
|
250
352
|
return ret;
|
|
251
353
|
}, arguments) };
|
|
252
354
|
|
|
253
|
-
export function
|
|
355
|
+
export function __wbg_info_033d8b8a0838f1d3(arg0, arg1, arg2, arg3) {
|
|
254
356
|
console.info(arg0, arg1, arg2, arg3);
|
|
255
357
|
};
|
|
256
358
|
|
|
257
|
-
export function
|
|
359
|
+
export function __wbg_log_cad59bb680daec67(arg0, arg1, arg2, arg3) {
|
|
258
360
|
console.log(arg0, arg1, arg2, arg3);
|
|
259
361
|
};
|
|
260
362
|
|
|
261
|
-
export function
|
|
363
|
+
export function __wbg_new_23a2665fac83c611(arg0, arg1) {
|
|
262
364
|
try {
|
|
263
365
|
var state0 = {a: arg0, b: arg1};
|
|
264
366
|
var cb0 = (arg0, arg1) => {
|
|
265
367
|
const a = state0.a;
|
|
266
368
|
state0.a = 0;
|
|
267
369
|
try {
|
|
268
|
-
return
|
|
370
|
+
return __wbg_adapter_62(a, state0.b, arg0, arg1);
|
|
269
371
|
} finally {
|
|
270
372
|
state0.a = a;
|
|
271
373
|
}
|
|
@@ -277,65 +379,85 @@ export function __wbg_new_3d446df9155128ef(arg0, arg1) {
|
|
|
277
379
|
}
|
|
278
380
|
};
|
|
279
381
|
|
|
280
|
-
export function
|
|
382
|
+
export function __wbg_new_405e22f390576ce2() {
|
|
383
|
+
const ret = new Object();
|
|
384
|
+
return ret;
|
|
385
|
+
};
|
|
386
|
+
|
|
387
|
+
export function __wbg_new_78feb108b6472713() {
|
|
388
|
+
const ret = new Array();
|
|
389
|
+
return ret;
|
|
390
|
+
};
|
|
391
|
+
|
|
392
|
+
export function __wbg_newnoargs_105ed471475aaf50(arg0, arg1) {
|
|
281
393
|
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
282
394
|
return ret;
|
|
283
395
|
};
|
|
284
396
|
|
|
285
|
-
export function
|
|
397
|
+
export function __wbg_push_737cfc8c1432c2c6(arg0, arg1) {
|
|
398
|
+
const ret = arg0.push(arg1);
|
|
399
|
+
return ret;
|
|
400
|
+
};
|
|
401
|
+
|
|
402
|
+
export function __wbg_queueMicrotask_97d92b4fcc8a61c5(arg0) {
|
|
286
403
|
queueMicrotask(arg0);
|
|
287
404
|
};
|
|
288
405
|
|
|
289
|
-
export function
|
|
406
|
+
export function __wbg_queueMicrotask_d3219def82552485(arg0) {
|
|
290
407
|
const ret = arg0.queueMicrotask;
|
|
291
408
|
return ret;
|
|
292
409
|
};
|
|
293
410
|
|
|
294
|
-
export function
|
|
411
|
+
export function __wbg_read_a2434af1186cb56c(arg0) {
|
|
295
412
|
const ret = arg0.read();
|
|
296
413
|
return ret;
|
|
297
414
|
};
|
|
298
415
|
|
|
299
|
-
export function
|
|
416
|
+
export function __wbg_resolve_4851785c9c5f573d(arg0) {
|
|
300
417
|
const ret = Promise.resolve(arg0);
|
|
301
418
|
return ret;
|
|
302
419
|
};
|
|
303
420
|
|
|
304
|
-
export function
|
|
421
|
+
export function __wbg_set_bb8cecf6a62b9f46() { return handleError(function (arg0, arg1, arg2) {
|
|
422
|
+
const ret = Reflect.set(arg0, arg1, arg2);
|
|
423
|
+
return ret;
|
|
424
|
+
}, arguments) };
|
|
425
|
+
|
|
426
|
+
export function __wbg_static_accessor_GLOBAL_88a902d13a557d07() {
|
|
305
427
|
const ret = typeof global === 'undefined' ? null : global;
|
|
306
428
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
307
429
|
};
|
|
308
430
|
|
|
309
|
-
export function
|
|
431
|
+
export function __wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0() {
|
|
310
432
|
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
311
433
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
312
434
|
};
|
|
313
435
|
|
|
314
|
-
export function
|
|
436
|
+
export function __wbg_static_accessor_SELF_37c5d418e4bf5819() {
|
|
315
437
|
const ret = typeof self === 'undefined' ? null : self;
|
|
316
438
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
317
439
|
};
|
|
318
440
|
|
|
319
|
-
export function
|
|
441
|
+
export function __wbg_static_accessor_WINDOW_5de37043a91a9c40() {
|
|
320
442
|
const ret = typeof window === 'undefined' ? null : window;
|
|
321
443
|
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
322
444
|
};
|
|
323
445
|
|
|
324
|
-
export function
|
|
446
|
+
export function __wbg_then_44b73946d2fb3e7d(arg0, arg1) {
|
|
325
447
|
const ret = arg0.then(arg1);
|
|
326
448
|
return ret;
|
|
327
449
|
};
|
|
328
450
|
|
|
329
|
-
export function
|
|
451
|
+
export function __wbg_then_48b406749878a531(arg0, arg1, arg2) {
|
|
330
452
|
const ret = arg0.then(arg1, arg2);
|
|
331
453
|
return ret;
|
|
332
454
|
};
|
|
333
455
|
|
|
334
|
-
export function
|
|
456
|
+
export function __wbg_warn_aaf1f4664a035bd6(arg0, arg1, arg2, arg3) {
|
|
335
457
|
console.warn(arg0, arg1, arg2, arg3);
|
|
336
458
|
};
|
|
337
459
|
|
|
338
|
-
export function
|
|
460
|
+
export function __wbg_write_311434e30ee214e5(arg0, arg1) {
|
|
339
461
|
const ret = arg0.write(arg1);
|
|
340
462
|
return ret;
|
|
341
463
|
};
|
|
@@ -356,11 +478,19 @@ export function __wbindgen_cb_drop(arg0) {
|
|
|
356
478
|
return ret;
|
|
357
479
|
};
|
|
358
480
|
|
|
359
|
-
export function
|
|
360
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
481
|
+
export function __wbindgen_closure_wrapper2914(arg0, arg1, arg2) {
|
|
482
|
+
const ret = makeMutClosure(arg0, arg1, 238, __wbg_adapter_24);
|
|
361
483
|
return ret;
|
|
362
484
|
};
|
|
363
485
|
|
|
486
|
+
export function __wbindgen_debug_string(arg0, arg1) {
|
|
487
|
+
const ret = debugString(arg1);
|
|
488
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
489
|
+
const len1 = WASM_VECTOR_LEN;
|
|
490
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
491
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
492
|
+
};
|
|
493
|
+
|
|
364
494
|
export function __wbindgen_init_externref_table() {
|
|
365
495
|
const table = wasm.__wbindgen_export_2;
|
|
366
496
|
const offset = table.grow(4);
|
package/qlue_ls_bg.wasm
CHANGED
|
Binary file
|