@mrclrchtr/supi-code-intelligence 6.2.0 → 6.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/README.md +2 -0
- package/node_modules/@mrclrchtr/supi-code-runtime/package.json +1 -1
- package/node_modules/@mrclrchtr/supi-core/package.json +1 -1
- package/node_modules/@mrclrchtr/supi-lsp/README.md +2 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-code-runtime/package.json +1 -1
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/@mrclrchtr/supi-core/package.json +1 -1
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/ignore/README.md +52 -0
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/ignore/index.js +785 -129
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/ignore/legacy.js +660 -98
- package/node_modules/@mrclrchtr/supi-lsp/node_modules/ignore/package.json +10 -4
- package/node_modules/@mrclrchtr/supi-lsp/package.json +3 -3
- package/node_modules/@mrclrchtr/supi-lsp/src/api.ts +16 -2
- package/node_modules/@mrclrchtr/supi-lsp/src/diagnostics/workspace-sentinels.ts +4 -32
- package/node_modules/@mrclrchtr/supi-lsp/src/diagnostics/workspace-sources.ts +108 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/manager/manager-process-crash-report.ts +106 -0
- package/node_modules/@mrclrchtr/supi-lsp/src/manager/manager-workspace-recovery.ts +4 -4
- package/node_modules/@mrclrchtr/supi-lsp/src/manager/manager.ts +513 -113
- package/node_modules/@mrclrchtr/supi-lsp/src/session/runtime-diagnostics.ts +43 -15
- package/node_modules/@mrclrchtr/supi-lsp/src/session/runtime-registry.ts +40 -33
- package/node_modules/@mrclrchtr/supi-lsp/src/session/workspace-lsp-runtime.ts +36 -6
- package/node_modules/@mrclrchtr/supi-lsp/src/summary.ts +1 -1
- package/node_modules/@mrclrchtr/supi-lsp/src/workspace-path-policy.ts +18 -9
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-code-runtime/package.json +1 -1
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/@mrclrchtr/supi-core/package.json +1 -1
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/README.md +29 -1
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/debug/web-tree-sitter.cjs +99 -19
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/debug/web-tree-sitter.cjs.map +4 -4
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/debug/web-tree-sitter.js +94 -18
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/debug/web-tree-sitter.js.map +4 -4
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/debug/web-tree-sitter.wasm +0 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/debug/web-tree-sitter.wasm.map +14 -14
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/package.json +13 -8
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/web-tree-sitter.cjs +97 -19
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/web-tree-sitter.cjs.map +4 -4
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/web-tree-sitter.d.cts +28 -8
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/web-tree-sitter.d.cts.map +1 -1
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/web-tree-sitter.d.ts +28 -8
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/web-tree-sitter.d.ts.map +1 -1
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/web-tree-sitter.js +92 -18
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/web-tree-sitter.js.map +4 -4
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/web-tree-sitter.wasm +0 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/web-tree-sitter.wasm.map +17 -17
- package/node_modules/@mrclrchtr/supi-tree-sitter/package.json +7 -4
- package/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/kotlin/tree-sitter-kotlin.wasm +0 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/kotlin/tree-sitter-kotlin.wasm.json +2 -2
- package/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/sql/tree-sitter-sql.wasm +0 -0
- package/node_modules/@mrclrchtr/supi-tree-sitter/resources/grammars/sql/tree-sitter-sql.wasm.json +2 -2
- package/package.json +5 -5
- package/src/session/health-refresh.ts +19 -12
- package/src/session/health-types.ts +8 -3
- package/src/session/health-workflow.ts +7 -3
- package/src/session/session.ts +12 -5
- package/src/substrate/lsp/maintenance.ts +53 -47
- package/src/substrate/lsp/settings.ts +2 -1
- package/src/substrate/lsp/source-tracking.ts +247 -0
- package/src/tool/code_find/guidance.ts +3 -3
- package/src/tool/code_graph/guidance.ts +2 -2
- package/src/tool/code_health/guidance.ts +3 -3
- package/src/tool/code_health/markdown.ts +21 -5
- package/src/tool/code_health/refresh-outcome.ts +48 -7
- package/src/tool/code_health/refresh-status.ts +83 -16
- package/src/tool/code_health/tui.ts +4 -0
- package/src/tool/code_inspect/guidance.ts +5 -3
- package/src/tool/code_orientation/guidance.ts +3 -4
- package/src/tool/code_refactor_apply/guidance.ts +1 -1
- package/src/tool/code_refactor_plan/guidance.ts +3 -5
- package/src/tool/code_resolve/guidance.ts +3 -3
- package/src/tool/guidance.ts +11 -9
package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/web-tree-sitter.d.cts
CHANGED
|
@@ -300,8 +300,9 @@ declare module 'web-tree-sitter' {
|
|
|
300
300
|
* This returns `null` if state is invalid for this language.
|
|
301
301
|
*
|
|
302
302
|
* Iterating {@link LookaheadIterator} will yield valid symbols in the given
|
|
303
|
-
* parse state.
|
|
304
|
-
*
|
|
303
|
+
* parse state. A newly created iterator is not positioned on a symbol, so
|
|
304
|
+
* {@link LookaheadIterator#currentType} returns `null` until the first
|
|
305
|
+
* iteration step.
|
|
305
306
|
*
|
|
306
307
|
* Lookahead iterators can be useful for generating suggestions and improving
|
|
307
308
|
* syntax error diagnostics. To get symbols valid in an `ERROR` node, use the
|
|
@@ -312,9 +313,16 @@ declare module 'web-tree-sitter' {
|
|
|
312
313
|
lookaheadIterator(stateId: number): LookaheadIterator | null;
|
|
313
314
|
/**
|
|
314
315
|
* Load a language from a WebAssembly module.
|
|
315
|
-
* The module can be provided as a path to a file or as a
|
|
316
|
+
* The module can be provided as a path to a file, a `URL` to a file, or as a
|
|
317
|
+
* buffer.
|
|
316
318
|
*/
|
|
317
|
-
static load(input: string | Uint8Array): Promise<Language>;
|
|
319
|
+
static load(input: string | URL | Uint8Array): Promise<Language>;
|
|
320
|
+
private static loadFromWasmExports;
|
|
321
|
+
/**
|
|
322
|
+
* Load a language synchronously from a pre-compiled WebAssembly module.
|
|
323
|
+
* Use this when the host environment provides a `WebAssembly.Module` directly.
|
|
324
|
+
*/
|
|
325
|
+
static loadSync(wasmModule: WebAssembly.Module): Language;
|
|
318
326
|
}
|
|
319
327
|
/** A tree that represents the syntactic structure of a source code file. */
|
|
320
328
|
export class Tree {
|
|
@@ -990,10 +998,22 @@ declare module 'web-tree-sitter' {
|
|
|
990
998
|
isPatternGuaranteedAtStep(byteIndex: number): boolean;
|
|
991
999
|
}
|
|
992
1000
|
export class LookaheadIterator implements Iterable<string> {
|
|
993
|
-
/**
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
1001
|
+
/**
|
|
1002
|
+
* Get the current symbol of the lookahead iterator.
|
|
1003
|
+
*
|
|
1004
|
+
* Returns `null` if the iterator is not positioned on a symbol:
|
|
1005
|
+
*
|
|
1006
|
+
* - Before the first iteration step
|
|
1007
|
+
* - After the iterator is exhausted
|
|
1008
|
+
* - After a {@link reset} or {@link resetState} call
|
|
1009
|
+
*/
|
|
1010
|
+
get currentTypeId(): number | null;
|
|
1011
|
+
/**
|
|
1012
|
+
* Get the current symbol name of the lookahead iterator.
|
|
1013
|
+
*
|
|
1014
|
+
* Returns `null` if the iterator is not positioned on a symbol.
|
|
1015
|
+
*/
|
|
1016
|
+
get currentType(): string | null;
|
|
997
1017
|
/** Delete the lookahead iterator, freeing its resources. */
|
|
998
1018
|
delete(): void;
|
|
999
1019
|
/**
|
|
@@ -53,6 +53,6 @@
|
|
|
53
53
|
null,
|
|
54
54
|
null
|
|
55
55
|
],
|
|
56
|
-
"mappings": ";;;;;;kBASiBA,KAAKA;;;;;;;;;;kBAYLC,KAAKA;;;;;;;;;;;;;aAsCVC,aAAaA;;;;aAKbC,gBAAgBA;;;;;;aAOhBC,WAAWA;cCrEVC,IAAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
56
|
+
"mappings": ";;;;;;kBASiBA,KAAKA;;;;;;;;;;kBAYLC,KAAKA;;;;;;;;;;;;;aAsCVC,aAAaA;;;;aAKbC,gBAAgBA;;;;;;aAOhBC,WAAWA;cCrEVC,IAAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBCgBAC,YAAYA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAmCZC,UAAUA;;;;;;;;;;;;;;;YAwBhBC,gBAAgBA;;;;;YAMhBC,sBAAsBA;;;;;cAWpBC,MAAMA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WCvFFC,gBAAgBA;;;;;;;;;cAYpBC,QAAQA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cCiBRC,IAAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cC1BJC,IAAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cCEJC,UAAUA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBCINC,YAAYA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAsEZC,UAAUA;;;;;aAMfC,eAAeA;;;;kBAKVC,cAAcA;;;;;;;;;;kBAYdC,YAAYA;;;;;;;;;;;;;;;kBAqBZC,UAAUA;;;;;;;;;;;;;cA2BfC,iBAAiBA;;;;;;;;aAAjBA,iBAAiBA;;;;;;;;;;;;aAajBC,aAAaA;;;;;;WAORC,oBAAoBA;;;;;;;;;WAOpBC,mBAAmBA;;;;cAyUvBC,KAAKA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cCzfLC,iBAAiBA",
|
|
57
57
|
"ignoreList": []
|
|
58
58
|
}
|
package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/web-tree-sitter.d.ts
CHANGED
|
@@ -300,8 +300,9 @@ declare module 'web-tree-sitter' {
|
|
|
300
300
|
* This returns `null` if state is invalid for this language.
|
|
301
301
|
*
|
|
302
302
|
* Iterating {@link LookaheadIterator} will yield valid symbols in the given
|
|
303
|
-
* parse state.
|
|
304
|
-
*
|
|
303
|
+
* parse state. A newly created iterator is not positioned on a symbol, so
|
|
304
|
+
* {@link LookaheadIterator#currentType} returns `null` until the first
|
|
305
|
+
* iteration step.
|
|
305
306
|
*
|
|
306
307
|
* Lookahead iterators can be useful for generating suggestions and improving
|
|
307
308
|
* syntax error diagnostics. To get symbols valid in an `ERROR` node, use the
|
|
@@ -312,9 +313,16 @@ declare module 'web-tree-sitter' {
|
|
|
312
313
|
lookaheadIterator(stateId: number): LookaheadIterator | null;
|
|
313
314
|
/**
|
|
314
315
|
* Load a language from a WebAssembly module.
|
|
315
|
-
* The module can be provided as a path to a file or as a
|
|
316
|
+
* The module can be provided as a path to a file, a `URL` to a file, or as a
|
|
317
|
+
* buffer.
|
|
316
318
|
*/
|
|
317
|
-
static load(input: string | Uint8Array): Promise<Language>;
|
|
319
|
+
static load(input: string | URL | Uint8Array): Promise<Language>;
|
|
320
|
+
private static loadFromWasmExports;
|
|
321
|
+
/**
|
|
322
|
+
* Load a language synchronously from a pre-compiled WebAssembly module.
|
|
323
|
+
* Use this when the host environment provides a `WebAssembly.Module` directly.
|
|
324
|
+
*/
|
|
325
|
+
static loadSync(wasmModule: WebAssembly.Module): Language;
|
|
318
326
|
}
|
|
319
327
|
/** A tree that represents the syntactic structure of a source code file. */
|
|
320
328
|
export class Tree {
|
|
@@ -990,10 +998,22 @@ declare module 'web-tree-sitter' {
|
|
|
990
998
|
isPatternGuaranteedAtStep(byteIndex: number): boolean;
|
|
991
999
|
}
|
|
992
1000
|
export class LookaheadIterator implements Iterable<string> {
|
|
993
|
-
/**
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
1001
|
+
/**
|
|
1002
|
+
* Get the current symbol of the lookahead iterator.
|
|
1003
|
+
*
|
|
1004
|
+
* Returns `null` if the iterator is not positioned on a symbol:
|
|
1005
|
+
*
|
|
1006
|
+
* - Before the first iteration step
|
|
1007
|
+
* - After the iterator is exhausted
|
|
1008
|
+
* - After a {@link reset} or {@link resetState} call
|
|
1009
|
+
*/
|
|
1010
|
+
get currentTypeId(): number | null;
|
|
1011
|
+
/**
|
|
1012
|
+
* Get the current symbol name of the lookahead iterator.
|
|
1013
|
+
*
|
|
1014
|
+
* Returns `null` if the iterator is not positioned on a symbol.
|
|
1015
|
+
*/
|
|
1016
|
+
get currentType(): string | null;
|
|
997
1017
|
/** Delete the lookahead iterator, freeing its resources. */
|
|
998
1018
|
delete(): void;
|
|
999
1019
|
/**
|
|
@@ -53,6 +53,6 @@
|
|
|
53
53
|
null,
|
|
54
54
|
null
|
|
55
55
|
],
|
|
56
|
-
"mappings": ";;;;;;kBASiBA,KAAKA;;;;;;;;;;kBAYLC,KAAKA;;;;;;;;;;;;;aAsCVC,aAAaA;;;;aAKbC,gBAAgBA;;;;;;aAOhBC,WAAWA;cCrEVC,IAAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
56
|
+
"mappings": ";;;;;;kBASiBA,KAAKA;;;;;;;;;;kBAYLC,KAAKA;;;;;;;;;;;;;aAsCVC,aAAaA;;;;aAKbC,gBAAgBA;;;;;;aAOhBC,WAAWA;cCrEVC,IAAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBCgBAC,YAAYA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAmCZC,UAAUA;;;;;;;;;;;;;;;YAwBhBC,gBAAgBA;;;;;YAMhBC,sBAAsBA;;;;;cAWpBC,MAAMA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WCvFFC,gBAAgBA;;;;;;;;;cAYpBC,QAAQA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cCiBRC,IAAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cC1BJC,IAAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cCEJC,UAAUA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBCINC,YAAYA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAsEZC,UAAUA;;;;;aAMfC,eAAeA;;;;kBAKVC,cAAcA;;;;;;;;;;kBAYdC,YAAYA;;;;;;;;;;;;;;;kBAqBZC,UAAUA;;;;;;;;;;;;;cA2BfC,iBAAiBA;;;;;;;;aAAjBA,iBAAiBA;;;;;;;;;;;;aAajBC,aAAaA;;;;;;WAORC,oBAAoBA;;;;;;;;;WAOpBC,mBAAmBA;;;;cAyUvBC,KAAKA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cCzfLC,iBAAiBA",
|
|
57
57
|
"ignoreList": []
|
|
58
58
|
}
|
package/node_modules/@mrclrchtr/supi-tree-sitter/node_modules/web-tree-sitter/web-tree-sitter.js
CHANGED
|
@@ -126,7 +126,21 @@ function setModule(module2) {
|
|
|
126
126
|
__name(setModule, "setModule");
|
|
127
127
|
var C;
|
|
128
128
|
|
|
129
|
+
// src/finalization_registry.ts
|
|
130
|
+
function newFinalizer(handler) {
|
|
131
|
+
try {
|
|
132
|
+
return new FinalizationRegistry(handler);
|
|
133
|
+
} catch (e) {
|
|
134
|
+
console.error("Unsupported FinalizationRegistry:", e);
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
__name(newFinalizer, "newFinalizer");
|
|
139
|
+
|
|
129
140
|
// src/lookahead_iterator.ts
|
|
141
|
+
var finalizer = newFinalizer((address) => {
|
|
142
|
+
C._ts_lookahead_iterator_delete(address);
|
|
143
|
+
});
|
|
130
144
|
var LookaheadIterator = class {
|
|
131
145
|
static {
|
|
132
146
|
__name(this, "LookaheadIterator");
|
|
@@ -137,21 +151,39 @@ var LookaheadIterator = class {
|
|
|
137
151
|
/** @internal */
|
|
138
152
|
language;
|
|
139
153
|
/** @internal */
|
|
154
|
+
positioned = false;
|
|
155
|
+
/** @internal */
|
|
140
156
|
constructor(internal, address, language) {
|
|
141
157
|
assertInternal(internal);
|
|
142
158
|
this[0] = address;
|
|
143
159
|
this.language = language;
|
|
160
|
+
finalizer?.register(this, address, this);
|
|
144
161
|
}
|
|
145
|
-
/**
|
|
162
|
+
/**
|
|
163
|
+
* Get the current symbol of the lookahead iterator.
|
|
164
|
+
*
|
|
165
|
+
* Returns `null` if the iterator is not positioned on a symbol:
|
|
166
|
+
*
|
|
167
|
+
* - Before the first iteration step
|
|
168
|
+
* - After the iterator is exhausted
|
|
169
|
+
* - After a {@link reset} or {@link resetState} call
|
|
170
|
+
*/
|
|
146
171
|
get currentTypeId() {
|
|
147
|
-
return C._ts_lookahead_iterator_current_symbol(this[0]);
|
|
172
|
+
return this.positioned ? C._ts_lookahead_iterator_current_symbol(this[0]) : null;
|
|
148
173
|
}
|
|
149
|
-
/**
|
|
174
|
+
/**
|
|
175
|
+
* Get the current symbol name of the lookahead iterator.
|
|
176
|
+
*
|
|
177
|
+
* Returns `null` if the iterator is not positioned on a symbol.
|
|
178
|
+
*/
|
|
150
179
|
get currentType() {
|
|
151
|
-
|
|
180
|
+
const id = this.currentTypeId;
|
|
181
|
+
if (id === null) return null;
|
|
182
|
+
return this.language.types[id] ?? C.UTF8ToString(C._ts_language_symbol_name(this.language[0], id));
|
|
152
183
|
}
|
|
153
184
|
/** Delete the lookahead iterator, freeing its resources. */
|
|
154
185
|
delete() {
|
|
186
|
+
finalizer?.unregister(this);
|
|
155
187
|
C._ts_lookahead_iterator_delete(this[0]);
|
|
156
188
|
this[0] = 0;
|
|
157
189
|
}
|
|
@@ -164,6 +196,7 @@ var LookaheadIterator = class {
|
|
|
164
196
|
reset(language, stateId) {
|
|
165
197
|
if (C._ts_lookahead_iterator_reset(this[0], language[0], stateId)) {
|
|
166
198
|
this.language = language;
|
|
199
|
+
this.positioned = false;
|
|
167
200
|
return true;
|
|
168
201
|
}
|
|
169
202
|
return false;
|
|
@@ -175,7 +208,9 @@ var LookaheadIterator = class {
|
|
|
175
208
|
* `false` otherwise.
|
|
176
209
|
*/
|
|
177
210
|
resetState(stateId) {
|
|
178
|
-
|
|
211
|
+
if (!C._ts_lookahead_iterator_reset_state(this[0], stateId)) return false;
|
|
212
|
+
this.positioned = false;
|
|
213
|
+
return true;
|
|
179
214
|
}
|
|
180
215
|
/**
|
|
181
216
|
* Returns an iterator that iterates over the symbols of the lookahead iterator.
|
|
@@ -186,10 +221,9 @@ var LookaheadIterator = class {
|
|
|
186
221
|
[Symbol.iterator]() {
|
|
187
222
|
return {
|
|
188
223
|
next: /* @__PURE__ */ __name(() => {
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
}
|
|
192
|
-
return { done: true, value: "" };
|
|
224
|
+
this.positioned = Boolean(C._ts_lookahead_iterator_next(this[0]));
|
|
225
|
+
const value = this.currentType;
|
|
226
|
+
return value === null ? { done: true, value: "" } : { done: false, value };
|
|
193
227
|
}, "next")
|
|
194
228
|
};
|
|
195
229
|
}
|
|
@@ -217,6 +251,9 @@ function getText(tree, startIndex, endIndex, startPosition) {
|
|
|
217
251
|
return result ?? "";
|
|
218
252
|
}
|
|
219
253
|
__name(getText, "getText");
|
|
254
|
+
var finalizer2 = newFinalizer((address) => {
|
|
255
|
+
C._ts_tree_delete(address);
|
|
256
|
+
});
|
|
220
257
|
var Tree = class _Tree {
|
|
221
258
|
static {
|
|
222
259
|
__name(this, "Tree");
|
|
@@ -234,6 +271,7 @@ var Tree = class _Tree {
|
|
|
234
271
|
this[0] = address;
|
|
235
272
|
this.language = language;
|
|
236
273
|
this.textCallback = textCallback;
|
|
274
|
+
finalizer2?.register(this, address, this);
|
|
237
275
|
}
|
|
238
276
|
/** Create a shallow copy of the syntax tree. This is very fast. */
|
|
239
277
|
copy() {
|
|
@@ -242,6 +280,7 @@ var Tree = class _Tree {
|
|
|
242
280
|
}
|
|
243
281
|
/** Delete the syntax tree, freeing its resources. */
|
|
244
282
|
delete() {
|
|
283
|
+
finalizer2?.unregister(this);
|
|
245
284
|
C._ts_tree_delete(this[0]);
|
|
246
285
|
this[0] = 0;
|
|
247
286
|
}
|
|
@@ -324,6 +363,9 @@ var Tree = class _Tree {
|
|
|
324
363
|
};
|
|
325
364
|
|
|
326
365
|
// src/tree_cursor.ts
|
|
366
|
+
var finalizer3 = newFinalizer((address) => {
|
|
367
|
+
C._ts_tree_cursor_delete_wasm(address);
|
|
368
|
+
});
|
|
327
369
|
var TreeCursor = class _TreeCursor {
|
|
328
370
|
static {
|
|
329
371
|
__name(this, "TreeCursor");
|
|
@@ -351,6 +393,7 @@ var TreeCursor = class _TreeCursor {
|
|
|
351
393
|
assertInternal(internal);
|
|
352
394
|
this.tree = tree;
|
|
353
395
|
unmarshalTreeCursor(this);
|
|
396
|
+
finalizer3?.register(this, this.tree[0], this);
|
|
354
397
|
}
|
|
355
398
|
/** Creates a deep copy of the tree cursor. This allocates new memory. */
|
|
356
399
|
copy() {
|
|
@@ -361,6 +404,7 @@ var TreeCursor = class _TreeCursor {
|
|
|
361
404
|
}
|
|
362
405
|
/** Delete the tree cursor, freeing its resources. */
|
|
363
406
|
delete() {
|
|
407
|
+
finalizer3?.unregister(this);
|
|
364
408
|
marshalTreeCursor(this);
|
|
365
409
|
C._ts_tree_cursor_delete_wasm(this.tree[0]);
|
|
366
410
|
this[0] = this[1] = this[2] = 0;
|
|
@@ -1461,8 +1505,9 @@ var Language = class _Language {
|
|
|
1461
1505
|
* This returns `null` if state is invalid for this language.
|
|
1462
1506
|
*
|
|
1463
1507
|
* Iterating {@link LookaheadIterator} will yield valid symbols in the given
|
|
1464
|
-
* parse state.
|
|
1465
|
-
*
|
|
1508
|
+
* parse state. A newly created iterator is not positioned on a symbol, so
|
|
1509
|
+
* {@link LookaheadIterator#currentType} returns `null` until the first
|
|
1510
|
+
* iteration step.
|
|
1466
1511
|
*
|
|
1467
1512
|
* Lookahead iterators can be useful for generating suggestions and improving
|
|
1468
1513
|
* syntax error diagnostics. To get symbols valid in an `ERROR` node, use the
|
|
@@ -1477,7 +1522,8 @@ var Language = class _Language {
|
|
|
1477
1522
|
}
|
|
1478
1523
|
/**
|
|
1479
1524
|
* Load a language from a WebAssembly module.
|
|
1480
|
-
* The module can be provided as a path to a file or as a
|
|
1525
|
+
* The module can be provided as a path to a file, a `URL` to a file, or as a
|
|
1526
|
+
* buffer.
|
|
1481
1527
|
*/
|
|
1482
1528
|
static async load(input) {
|
|
1483
1529
|
let binary2;
|
|
@@ -1504,16 +1550,27 @@ ${body2}`);
|
|
|
1504
1550
|
}
|
|
1505
1551
|
}
|
|
1506
1552
|
const mod = await C.loadWebAssemblyModule(binary2, { loadAsync: true });
|
|
1553
|
+
return _Language.loadFromWasmExports(mod, { sync: false });
|
|
1554
|
+
}
|
|
1555
|
+
static loadFromWasmExports(mod, { sync }) {
|
|
1507
1556
|
const symbolNames = Object.keys(mod);
|
|
1508
1557
|
const functionName = symbolNames.find((key) => LANGUAGE_FUNCTION_REGEX.test(key) && !key.includes("external_scanner_"));
|
|
1509
1558
|
if (!functionName) {
|
|
1510
1559
|
console.log(`Couldn't find language function in Wasm file. Symbols:
|
|
1511
1560
|
${JSON.stringify(symbolNames, null, 2)}`);
|
|
1512
|
-
throw new Error("
|
|
1561
|
+
throw new Error(`Language.${sync ? "loadSync" : "load"} failed: no language function found in Wasm file`);
|
|
1513
1562
|
}
|
|
1514
1563
|
const languageAddress = mod[functionName]();
|
|
1515
1564
|
return new _Language(INTERNAL, languageAddress);
|
|
1516
1565
|
}
|
|
1566
|
+
/**
|
|
1567
|
+
* Load a language synchronously from a pre-compiled WebAssembly module.
|
|
1568
|
+
* Use this when the host environment provides a `WebAssembly.Module` directly.
|
|
1569
|
+
*/
|
|
1570
|
+
static loadSync(wasmModule) {
|
|
1571
|
+
const mod = C.loadWebAssemblyModule(wasmModule, { loadAsync: false });
|
|
1572
|
+
return _Language.loadFromWasmExports(mod, { sync: true });
|
|
1573
|
+
}
|
|
1517
1574
|
};
|
|
1518
1575
|
|
|
1519
1576
|
// lib/web-tree-sitter.mjs
|
|
@@ -2038,7 +2095,7 @@ async function Module2(moduleArg = {}) {
|
|
|
2038
2095
|
newDSO("__main__", 0, wasmImports);
|
|
2039
2096
|
}
|
|
2040
2097
|
};
|
|
2041
|
-
var ___heap_base =
|
|
2098
|
+
var ___heap_base = 82240;
|
|
2042
2099
|
var alignMemory = /* @__PURE__ */ __name((size, alignment) => Math.ceil(size / alignment) * alignment, "alignMemory");
|
|
2043
2100
|
var getMemory = /* @__PURE__ */ __name((size) => {
|
|
2044
2101
|
if (runtimeInitialized) {
|
|
@@ -2603,12 +2660,12 @@ async function Module2(moduleArg = {}) {
|
|
|
2603
2660
|
"value": "i32",
|
|
2604
2661
|
"mutable": false
|
|
2605
2662
|
}, 1024);
|
|
2606
|
-
var ___stack_high =
|
|
2607
|
-
var ___stack_low =
|
|
2663
|
+
var ___stack_high = 82240;
|
|
2664
|
+
var ___stack_low = 16704;
|
|
2608
2665
|
var ___stack_pointer = new WebAssembly.Global({
|
|
2609
2666
|
"value": "i32",
|
|
2610
2667
|
"mutable": true
|
|
2611
|
-
},
|
|
2668
|
+
}, 82240);
|
|
2612
2669
|
var ___table_base = new WebAssembly.Global({
|
|
2613
2670
|
"value": "i32",
|
|
2614
2671
|
"mutable": false
|
|
@@ -2869,7 +2926,7 @@ async function Module2(moduleArg = {}) {
|
|
|
2869
2926
|
Module["loadWebAssemblyModule"] = loadWebAssemblyModule;
|
|
2870
2927
|
Module["LE_HEAP_STORE_I64"] = LE_HEAP_STORE_I64;
|
|
2871
2928
|
var ASM_CONSTS = {};
|
|
2872
|
-
var _malloc, _calloc, _realloc, _free, _ts_range_edit, _memcmp, _ts_language_symbol_count, _ts_language_state_count, _ts_language_abi_version, _ts_language_name, _ts_language_field_count, _ts_language_next_state, _ts_language_symbol_name, _ts_language_symbol_for_name, _strncmp, _ts_language_symbol_type, _ts_language_field_name_for_id, _ts_lookahead_iterator_new, _ts_lookahead_iterator_delete, _ts_lookahead_iterator_reset_state, _ts_lookahead_iterator_reset, _ts_lookahead_iterator_next, _ts_lookahead_iterator_current_symbol, _ts_point_edit, _ts_parser_delete, _ts_parser_reset, _ts_parser_set_language, _ts_parser_set_included_ranges, _ts_query_new, _ts_query_delete, _iswspace, _iswalnum, _ts_query_pattern_count, _ts_query_capture_count, _ts_query_string_count, _ts_query_capture_name_for_id, _ts_query_capture_quantifier_for_id, _ts_query_string_value_for_id, _ts_query_predicates_for_pattern, _ts_query_start_byte_for_pattern, _ts_query_end_byte_for_pattern, _ts_query_is_pattern_rooted, _ts_query_is_pattern_non_local, _ts_query_is_pattern_guaranteed_at_step, _ts_query_disable_capture, _ts_query_disable_pattern, _ts_tree_copy, _ts_tree_delete, _ts_init, _ts_parser_new_wasm, _ts_parser_enable_logger_wasm, _ts_parser_parse_wasm, _ts_parser_included_ranges_wasm, _ts_language_type_is_named_wasm, _ts_language_type_is_visible_wasm, _ts_language_metadata_wasm, _ts_language_supertypes_wasm, _ts_language_subtypes_wasm, _ts_tree_root_node_wasm, _ts_tree_root_node_with_offset_wasm, _ts_tree_edit_wasm, _ts_tree_included_ranges_wasm, _ts_tree_get_changed_ranges_wasm, _ts_tree_cursor_new_wasm, _ts_tree_cursor_copy_wasm, _ts_tree_cursor_delete_wasm, _ts_tree_cursor_reset_wasm, _ts_tree_cursor_reset_to_wasm, _ts_tree_cursor_goto_first_child_wasm, _ts_tree_cursor_goto_last_child_wasm, _ts_tree_cursor_goto_first_child_for_index_wasm, _ts_tree_cursor_goto_first_child_for_position_wasm, _ts_tree_cursor_goto_next_sibling_wasm, _ts_tree_cursor_goto_previous_sibling_wasm, _ts_tree_cursor_goto_descendant_wasm, _ts_tree_cursor_goto_parent_wasm, _ts_tree_cursor_current_node_type_id_wasm, _ts_tree_cursor_current_node_state_id_wasm, _ts_tree_cursor_current_node_is_named_wasm, _ts_tree_cursor_current_node_is_missing_wasm, _ts_tree_cursor_current_node_id_wasm, _ts_tree_cursor_start_position_wasm, _ts_tree_cursor_end_position_wasm, _ts_tree_cursor_start_index_wasm, _ts_tree_cursor_end_index_wasm, _ts_tree_cursor_current_field_id_wasm, _ts_tree_cursor_current_depth_wasm, _ts_tree_cursor_current_descendant_index_wasm, _ts_tree_cursor_current_node_wasm, _ts_node_symbol_wasm, _ts_node_field_name_for_child_wasm, _ts_node_field_name_for_named_child_wasm, _ts_node_children_by_field_id_wasm, _ts_node_first_child_for_byte_wasm, _ts_node_first_named_child_for_byte_wasm, _ts_node_grammar_symbol_wasm, _ts_node_child_count_wasm, _ts_node_named_child_count_wasm, _ts_node_child_wasm, _ts_node_named_child_wasm, _ts_node_child_by_field_id_wasm, _ts_node_next_sibling_wasm, _ts_node_prev_sibling_wasm, _ts_node_next_named_sibling_wasm, _ts_node_prev_named_sibling_wasm, _ts_node_descendant_count_wasm, _ts_node_parent_wasm, _ts_node_child_with_descendant_wasm, _ts_node_descendant_for_index_wasm, _ts_node_named_descendant_for_index_wasm, _ts_node_descendant_for_position_wasm, _ts_node_named_descendant_for_position_wasm, _ts_node_start_point_wasm, _ts_node_end_point_wasm, _ts_node_start_index_wasm, _ts_node_end_index_wasm, _ts_node_to_string_wasm, _ts_node_children_wasm, _ts_node_named_children_wasm, _ts_node_descendants_of_type_wasm, _ts_node_is_named_wasm, _ts_node_has_changes_wasm, _ts_node_has_error_wasm, _ts_node_is_error_wasm, _ts_node_is_missing_wasm, _ts_node_is_extra_wasm, _ts_node_parse_state_wasm, _ts_node_next_parse_state_wasm, _ts_query_matches_wasm, _ts_query_captures_wasm, _memset, _memcpy, _memmove, _iswalpha, _iswblank, _iswdigit, _iswlower, _iswupper, _iswxdigit, _memchr, _strlen, _strcmp, _strncat, _strncpy, _towlower, _towupper, _setThrew, __emscripten_stack_restore, __emscripten_stack_alloc, _emscripten_stack_get_current, ___wasm_apply_data_relocs;
|
|
2929
|
+
var _malloc, _calloc, _realloc, _free, _ts_range_edit, _memcmp, _ts_language_symbol_count, _ts_language_state_count, _ts_language_abi_version, _ts_language_name, _ts_language_field_count, _ts_language_next_state, _ts_language_symbol_name, _ts_language_symbol_for_name, _strncmp, _ts_language_symbol_type, _ts_language_field_name_for_id, _ts_lookahead_iterator_new, _ts_lookahead_iterator_delete, _ts_lookahead_iterator_reset_state, _ts_lookahead_iterator_reset, _ts_lookahead_iterator_next, _ts_lookahead_iterator_current_symbol, _ts_point_edit, _ts_parser_delete, _ts_parser_reset, _ts_parser_set_language, _ts_parser_set_included_ranges, _ts_query_new, _ts_query_delete, _iswspace, _iswalnum, _ts_query_copy, _ts_query_pattern_count, _ts_query_capture_count, _ts_query_string_count, _ts_query_capture_name_for_id, _ts_query_capture_quantifier_for_id, _ts_query_string_value_for_id, _ts_query_predicates_for_pattern, _ts_query_start_byte_for_pattern, _ts_query_end_byte_for_pattern, _ts_query_is_pattern_rooted, _ts_query_is_pattern_non_local, _ts_query_is_pattern_guaranteed_at_step, _ts_query_disable_capture, _ts_query_disable_pattern, _ts_tree_copy, _ts_tree_delete, _ts_init, _ts_parser_new_wasm, _ts_parser_enable_logger_wasm, _ts_parser_parse_wasm, _ts_parser_included_ranges_wasm, _ts_language_type_is_named_wasm, _ts_language_type_is_visible_wasm, _ts_language_metadata_wasm, _ts_language_supertypes_wasm, _ts_language_subtypes_wasm, _ts_tree_root_node_wasm, _ts_tree_root_node_with_offset_wasm, _ts_tree_edit_wasm, _ts_tree_included_ranges_wasm, _ts_tree_get_changed_ranges_wasm, _ts_tree_cursor_new_wasm, _ts_tree_cursor_copy_wasm, _ts_tree_cursor_delete_wasm, _ts_tree_cursor_reset_wasm, _ts_tree_cursor_reset_to_wasm, _ts_tree_cursor_goto_first_child_wasm, _ts_tree_cursor_goto_last_child_wasm, _ts_tree_cursor_goto_first_child_for_index_wasm, _ts_tree_cursor_goto_first_child_for_position_wasm, _ts_tree_cursor_goto_next_sibling_wasm, _ts_tree_cursor_goto_previous_sibling_wasm, _ts_tree_cursor_goto_descendant_wasm, _ts_tree_cursor_goto_parent_wasm, _ts_tree_cursor_current_node_type_id_wasm, _ts_tree_cursor_current_node_state_id_wasm, _ts_tree_cursor_current_node_is_named_wasm, _ts_tree_cursor_current_node_is_missing_wasm, _ts_tree_cursor_current_node_id_wasm, _ts_tree_cursor_start_position_wasm, _ts_tree_cursor_end_position_wasm, _ts_tree_cursor_start_index_wasm, _ts_tree_cursor_end_index_wasm, _ts_tree_cursor_current_field_id_wasm, _ts_tree_cursor_current_depth_wasm, _ts_tree_cursor_current_descendant_index_wasm, _ts_tree_cursor_current_node_wasm, _ts_node_symbol_wasm, _ts_node_field_name_for_child_wasm, _ts_node_field_name_for_named_child_wasm, _ts_node_children_by_field_id_wasm, _ts_node_first_child_for_byte_wasm, _ts_node_first_named_child_for_byte_wasm, _ts_node_grammar_symbol_wasm, _ts_node_child_count_wasm, _ts_node_named_child_count_wasm, _ts_node_child_wasm, _ts_node_named_child_wasm, _ts_node_child_by_field_id_wasm, _ts_node_next_sibling_wasm, _ts_node_prev_sibling_wasm, _ts_node_next_named_sibling_wasm, _ts_node_prev_named_sibling_wasm, _ts_node_descendant_count_wasm, _ts_node_parent_wasm, _ts_node_child_with_descendant_wasm, _ts_node_descendant_for_index_wasm, _ts_node_named_descendant_for_index_wasm, _ts_node_descendant_for_position_wasm, _ts_node_named_descendant_for_position_wasm, _ts_node_start_point_wasm, _ts_node_end_point_wasm, _ts_node_start_index_wasm, _ts_node_end_index_wasm, _ts_node_to_string_wasm, _ts_node_children_wasm, _ts_node_named_children_wasm, _ts_node_descendants_of_type_wasm, _ts_node_is_named_wasm, _ts_node_has_changes_wasm, _ts_node_has_error_wasm, _ts_node_is_error_wasm, _ts_node_is_missing_wasm, _ts_node_is_extra_wasm, _ts_node_parse_state_wasm, _ts_node_next_parse_state_wasm, _ts_query_matches_wasm, _ts_query_captures_wasm, _memset, _memcpy, _memmove, _iswalpha, _iswblank, _iswdigit, _iswlower, _iswpunct, _iswupper, _iswxdigit, _memchr, _strlen, _strcmp, _strncat, _strncpy, _towlower, _towupper, _setThrew, __emscripten_stack_restore, __emscripten_stack_alloc, _emscripten_stack_get_current, ___wasm_apply_data_relocs;
|
|
2873
2930
|
function assignWasmExports(wasmExports2) {
|
|
2874
2931
|
Module["_malloc"] = _malloc = wasmExports2["malloc"];
|
|
2875
2932
|
Module["_calloc"] = _calloc = wasmExports2["calloc"];
|
|
@@ -2903,6 +2960,7 @@ async function Module2(moduleArg = {}) {
|
|
|
2903
2960
|
Module["_ts_query_delete"] = _ts_query_delete = wasmExports2["ts_query_delete"];
|
|
2904
2961
|
Module["_iswspace"] = _iswspace = wasmExports2["iswspace"];
|
|
2905
2962
|
Module["_iswalnum"] = _iswalnum = wasmExports2["iswalnum"];
|
|
2963
|
+
Module["_ts_query_copy"] = _ts_query_copy = wasmExports2["ts_query_copy"];
|
|
2906
2964
|
Module["_ts_query_pattern_count"] = _ts_query_pattern_count = wasmExports2["ts_query_pattern_count"];
|
|
2907
2965
|
Module["_ts_query_capture_count"] = _ts_query_capture_count = wasmExports2["ts_query_capture_count"];
|
|
2908
2966
|
Module["_ts_query_string_count"] = _ts_query_string_count = wasmExports2["ts_query_string_count"];
|
|
@@ -3008,6 +3066,7 @@ async function Module2(moduleArg = {}) {
|
|
|
3008
3066
|
Module["_iswblank"] = _iswblank = wasmExports2["iswblank"];
|
|
3009
3067
|
Module["_iswdigit"] = _iswdigit = wasmExports2["iswdigit"];
|
|
3010
3068
|
Module["_iswlower"] = _iswlower = wasmExports2["iswlower"];
|
|
3069
|
+
Module["_iswpunct"] = _iswpunct = wasmExports2["iswpunct"];
|
|
3011
3070
|
Module["_iswupper"] = _iswupper = wasmExports2["iswupper"];
|
|
3012
3071
|
Module["_iswxdigit"] = _iswxdigit = wasmExports2["iswxdigit"];
|
|
3013
3072
|
Module["_memchr"] = _memchr = wasmExports2["memchr"];
|
|
@@ -3149,6 +3208,10 @@ __name(checkModule, "checkModule");
|
|
|
3149
3208
|
var TRANSFER_BUFFER;
|
|
3150
3209
|
var LANGUAGE_VERSION;
|
|
3151
3210
|
var MIN_COMPATIBLE_VERSION;
|
|
3211
|
+
var finalizer4 = newFinalizer((addresses) => {
|
|
3212
|
+
C._ts_parser_delete(addresses[0]);
|
|
3213
|
+
C._free(addresses[1]);
|
|
3214
|
+
});
|
|
3152
3215
|
var Parser = class {
|
|
3153
3216
|
static {
|
|
3154
3217
|
__name(this, "Parser");
|
|
@@ -3180,6 +3243,7 @@ var Parser = class {
|
|
|
3180
3243
|
*/
|
|
3181
3244
|
constructor() {
|
|
3182
3245
|
this.initialize();
|
|
3246
|
+
finalizer4?.register(this, [this[0], this[1]], this);
|
|
3183
3247
|
}
|
|
3184
3248
|
/** @internal */
|
|
3185
3249
|
initialize() {
|
|
@@ -3192,6 +3256,7 @@ var Parser = class {
|
|
|
3192
3256
|
}
|
|
3193
3257
|
/** Delete the parser, freeing its resources. */
|
|
3194
3258
|
delete() {
|
|
3259
|
+
finalizer4?.unregister(this);
|
|
3195
3260
|
C._ts_parser_delete(this[0]);
|
|
3196
3261
|
C._free(this[1]);
|
|
3197
3262
|
this[0] = 0;
|
|
@@ -3369,6 +3434,10 @@ var QueryError = class _QueryError extends Error {
|
|
|
3369
3434
|
this.length = length;
|
|
3370
3435
|
this.name = "QueryError";
|
|
3371
3436
|
}
|
|
3437
|
+
kind;
|
|
3438
|
+
info;
|
|
3439
|
+
index;
|
|
3440
|
+
length;
|
|
3372
3441
|
static {
|
|
3373
3442
|
__name(this, "QueryError");
|
|
3374
3443
|
}
|
|
@@ -3564,6 +3633,9 @@ function parsePattern(index, stepType, stepValueId, captureNames, stringValues,
|
|
|
3564
3633
|
}
|
|
3565
3634
|
}
|
|
3566
3635
|
__name(parsePattern, "parsePattern");
|
|
3636
|
+
var finalizer5 = newFinalizer((address) => {
|
|
3637
|
+
C._ts_query_delete(address);
|
|
3638
|
+
});
|
|
3567
3639
|
var Query = class {
|
|
3568
3640
|
static {
|
|
3569
3641
|
__name(this, "Query");
|
|
@@ -3718,9 +3790,11 @@ var Query = class {
|
|
|
3718
3790
|
this.assertedProperties = assertedProperties;
|
|
3719
3791
|
this.refutedProperties = refutedProperties;
|
|
3720
3792
|
this.exceededMatchLimit = false;
|
|
3793
|
+
finalizer5?.register(this, address, this);
|
|
3721
3794
|
}
|
|
3722
3795
|
/** Delete the query, freeing its resources. */
|
|
3723
3796
|
delete() {
|
|
3797
|
+
finalizer5?.unregister(this);
|
|
3724
3798
|
C._ts_query_delete(this[0]);
|
|
3725
3799
|
this[0] = 0;
|
|
3726
3800
|
}
|