@willbooster/web-tree-sitter 19.1.0 → 20.0.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 +0 -20
- package/debug/web-tree-sitter.cjs +168 -433
- package/debug/web-tree-sitter.cjs.map +4 -4
- package/debug/web-tree-sitter.js +168 -432
- package/debug/web-tree-sitter.js.map +4 -4
- package/debug/web-tree-sitter.wasm +0 -0
- package/debug/web-tree-sitter.wasm.map +17 -23
- package/package.json +1 -2
- package/web-tree-sitter.cjs +3 -3
- package/web-tree-sitter.cjs.map +4 -4
- package/web-tree-sitter.d.cts +2 -86
- package/web-tree-sitter.d.cts.map +1 -4
- package/web-tree-sitter.d.ts +2 -86
- package/web-tree-sitter.d.ts.map +1 -4
- package/web-tree-sitter.js +3 -3
- package/web-tree-sitter.js.map +4 -4
- package/web-tree-sitter.wasm +0 -0
- package/web-tree-sitter.wasm.map +22 -28
- package/web-tree-sitter.web.js +3 -3
- package/web-tree-sitter.web.js.map +4 -4
package/debug/web-tree-sitter.js
CHANGED
|
@@ -1,108 +1,6 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
2
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
3
|
|
|
4
|
-
// src/edit.ts
|
|
5
|
-
var Edit = class {
|
|
6
|
-
static {
|
|
7
|
-
__name(this, "Edit");
|
|
8
|
-
}
|
|
9
|
-
/** The start position of the change. */
|
|
10
|
-
startPosition;
|
|
11
|
-
/** The end position of the change before the edit. */
|
|
12
|
-
oldEndPosition;
|
|
13
|
-
/** The end position of the change after the edit. */
|
|
14
|
-
newEndPosition;
|
|
15
|
-
/** The start index of the change. */
|
|
16
|
-
startIndex;
|
|
17
|
-
/** The end index of the change before the edit. */
|
|
18
|
-
oldEndIndex;
|
|
19
|
-
/** The end index of the change after the edit. */
|
|
20
|
-
newEndIndex;
|
|
21
|
-
constructor({
|
|
22
|
-
startIndex,
|
|
23
|
-
oldEndIndex,
|
|
24
|
-
newEndIndex,
|
|
25
|
-
startPosition,
|
|
26
|
-
oldEndPosition,
|
|
27
|
-
newEndPosition
|
|
28
|
-
}) {
|
|
29
|
-
this.startIndex = startIndex >>> 0;
|
|
30
|
-
this.oldEndIndex = oldEndIndex >>> 0;
|
|
31
|
-
this.newEndIndex = newEndIndex >>> 0;
|
|
32
|
-
this.startPosition = startPosition;
|
|
33
|
-
this.oldEndPosition = oldEndPosition;
|
|
34
|
-
this.newEndPosition = newEndPosition;
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Edit a point and index to keep it in-sync with source code that has been edited.
|
|
38
|
-
*
|
|
39
|
-
* This function updates a single point's byte offset and row/column position
|
|
40
|
-
* based on an edit operation. This is useful for editing points without
|
|
41
|
-
* requiring a tree or node instance.
|
|
42
|
-
*/
|
|
43
|
-
editPoint(point, index) {
|
|
44
|
-
let newIndex = index;
|
|
45
|
-
const newPoint = { ...point };
|
|
46
|
-
if (index >= this.oldEndIndex) {
|
|
47
|
-
newIndex = this.newEndIndex + (index - this.oldEndIndex);
|
|
48
|
-
const originalRow = point.row;
|
|
49
|
-
newPoint.row = this.newEndPosition.row + (point.row - this.oldEndPosition.row);
|
|
50
|
-
newPoint.column = originalRow === this.oldEndPosition.row ? this.newEndPosition.column + (point.column - this.oldEndPosition.column) : point.column;
|
|
51
|
-
} else if (index > this.startIndex) {
|
|
52
|
-
newIndex = this.newEndIndex;
|
|
53
|
-
newPoint.row = this.newEndPosition.row;
|
|
54
|
-
newPoint.column = this.newEndPosition.column;
|
|
55
|
-
}
|
|
56
|
-
return { point: newPoint, index: newIndex };
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Edit a range to keep it in-sync with source code that has been edited.
|
|
60
|
-
*
|
|
61
|
-
* This function updates a range's start and end positions based on an edit
|
|
62
|
-
* operation. This is useful for editing ranges without requiring a tree
|
|
63
|
-
* or node instance.
|
|
64
|
-
*/
|
|
65
|
-
editRange(range) {
|
|
66
|
-
const newRange = {
|
|
67
|
-
startIndex: range.startIndex,
|
|
68
|
-
startPosition: { ...range.startPosition },
|
|
69
|
-
endIndex: range.endIndex,
|
|
70
|
-
endPosition: { ...range.endPosition }
|
|
71
|
-
};
|
|
72
|
-
if (range.endIndex >= this.oldEndIndex) {
|
|
73
|
-
if (range.endIndex !== Number.MAX_SAFE_INTEGER) {
|
|
74
|
-
newRange.endIndex = this.newEndIndex + (range.endIndex - this.oldEndIndex);
|
|
75
|
-
newRange.endPosition = {
|
|
76
|
-
row: this.newEndPosition.row + (range.endPosition.row - this.oldEndPosition.row),
|
|
77
|
-
column: range.endPosition.row === this.oldEndPosition.row ? this.newEndPosition.column + (range.endPosition.column - this.oldEndPosition.column) : range.endPosition.column
|
|
78
|
-
};
|
|
79
|
-
if (newRange.endIndex < this.newEndIndex) {
|
|
80
|
-
newRange.endIndex = Number.MAX_SAFE_INTEGER;
|
|
81
|
-
newRange.endPosition = { row: Number.MAX_SAFE_INTEGER, column: Number.MAX_SAFE_INTEGER };
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
} else if (range.endIndex > this.startIndex) {
|
|
85
|
-
newRange.endIndex = this.startIndex;
|
|
86
|
-
newRange.endPosition = { ...this.startPosition };
|
|
87
|
-
}
|
|
88
|
-
if (range.startIndex >= this.oldEndIndex) {
|
|
89
|
-
newRange.startIndex = this.newEndIndex + (range.startIndex - this.oldEndIndex);
|
|
90
|
-
newRange.startPosition = {
|
|
91
|
-
row: this.newEndPosition.row + (range.startPosition.row - this.oldEndPosition.row),
|
|
92
|
-
column: range.startPosition.row === this.oldEndPosition.row ? this.newEndPosition.column + (range.startPosition.column - this.oldEndPosition.column) : range.startPosition.column
|
|
93
|
-
};
|
|
94
|
-
if (newRange.startIndex < this.newEndIndex) {
|
|
95
|
-
newRange.startIndex = Number.MAX_SAFE_INTEGER;
|
|
96
|
-
newRange.startPosition = { row: Number.MAX_SAFE_INTEGER, column: Number.MAX_SAFE_INTEGER };
|
|
97
|
-
}
|
|
98
|
-
} else if (range.startIndex > this.startIndex) {
|
|
99
|
-
newRange.startIndex = this.startIndex;
|
|
100
|
-
newRange.startPosition = { ...this.startPosition };
|
|
101
|
-
}
|
|
102
|
-
return newRange;
|
|
103
|
-
}
|
|
104
|
-
};
|
|
105
|
-
|
|
106
4
|
// src/constants.ts
|
|
107
5
|
var SIZE_OF_INT = 4;
|
|
108
6
|
var SIZE_OF_NODE = 5 * SIZE_OF_INT;
|
|
@@ -241,8 +139,6 @@ var TreeCursor = class _TreeCursor {
|
|
|
241
139
|
/** @internal */
|
|
242
140
|
tree;
|
|
243
141
|
/** @internal */
|
|
244
|
-
editVersion = -1;
|
|
245
|
-
/** @internal */
|
|
246
142
|
_nodeTypeId = 0;
|
|
247
143
|
/** @internal */
|
|
248
144
|
_fieldId = 0;
|
|
@@ -286,21 +182,21 @@ var TreeCursor = class _TreeCursor {
|
|
|
286
182
|
}
|
|
287
183
|
/** Get the field name of this tree cursor's current node. */
|
|
288
184
|
get currentFieldName() {
|
|
289
|
-
return this.tree.language.fields[this._fieldId];
|
|
185
|
+
return this.tree.language.fields[this._fieldId] ?? null;
|
|
290
186
|
}
|
|
291
187
|
/**
|
|
292
188
|
* Get the depth of the cursor's current node relative to the original
|
|
293
189
|
* node that the cursor was constructed with.
|
|
294
190
|
*/
|
|
295
191
|
get currentDepth() {
|
|
296
|
-
return C.
|
|
192
|
+
return C._ts_tree_cursor_current_depth(this[0]) >>> 0;
|
|
297
193
|
}
|
|
298
194
|
/**
|
|
299
195
|
* Get the index of the cursor's current node out of all of the
|
|
300
196
|
* descendants of the original node that the cursor was constructed with.
|
|
301
197
|
*/
|
|
302
198
|
get currentDescendantIndex() {
|
|
303
|
-
return C.
|
|
199
|
+
return C._ts_tree_cursor_current_descendant_index(this[0]) >>> 0;
|
|
304
200
|
}
|
|
305
201
|
/** Get the type of the cursor's current node. */
|
|
306
202
|
get nodeType() {
|
|
@@ -338,8 +234,8 @@ var TreeCursor = class _TreeCursor {
|
|
|
338
234
|
}
|
|
339
235
|
/** Get the string content of the cursor's current node. */
|
|
340
236
|
get nodeText() {
|
|
341
|
-
this.
|
|
342
|
-
return
|
|
237
|
+
const { textSource } = this.tree;
|
|
238
|
+
return typeof textSource === "string" ? textSource.slice(this._startIndex, this._endIndex) : getCallbackText(textSource, this._startIndex, this._endIndex, this.startPosition);
|
|
343
239
|
}
|
|
344
240
|
/** Get the start position of the cursor's current node. */
|
|
345
241
|
get startPosition() {
|
|
@@ -353,12 +249,10 @@ var TreeCursor = class _TreeCursor {
|
|
|
353
249
|
}
|
|
354
250
|
/** Get the start index of the cursor's current node. */
|
|
355
251
|
get startIndex() {
|
|
356
|
-
this.syncIndices();
|
|
357
252
|
return this._startIndex;
|
|
358
253
|
}
|
|
359
254
|
/** Get the end index of the cursor's current node. */
|
|
360
255
|
get endIndex() {
|
|
361
|
-
this.syncIndices();
|
|
362
256
|
return this._endIndex;
|
|
363
257
|
}
|
|
364
258
|
/**
|
|
@@ -463,8 +357,13 @@ var TreeCursor = class _TreeCursor {
|
|
|
463
357
|
* `false` if no such child was found.
|
|
464
358
|
*/
|
|
465
359
|
gotoFirstChildForPosition(goalPosition) {
|
|
466
|
-
|
|
467
|
-
|
|
360
|
+
if (!C._ts_tree_cursor_goto_first_child_for_position_wasm(
|
|
361
|
+
this[0],
|
|
362
|
+
goalPosition.row,
|
|
363
|
+
goalPosition.column
|
|
364
|
+
)) {
|
|
365
|
+
return false;
|
|
366
|
+
}
|
|
468
367
|
this.readNodeCache();
|
|
469
368
|
return true;
|
|
470
369
|
}
|
|
@@ -485,7 +384,7 @@ var TreeCursor = class _TreeCursor {
|
|
|
485
384
|
* information and allows reusing already created cursors.
|
|
486
385
|
*/
|
|
487
386
|
resetTo(cursor) {
|
|
488
|
-
if (
|
|
387
|
+
if (this[0] === cursor[0]) return;
|
|
489
388
|
this.tree = cursor.tree;
|
|
490
389
|
C._ts_tree_cursor_reset_to_wasm(this[0], cursor[0]);
|
|
491
390
|
this.readNodeCache();
|
|
@@ -499,30 +398,17 @@ var TreeCursor = class _TreeCursor {
|
|
|
499
398
|
this._startIndex = heap[base + 2];
|
|
500
399
|
this._endIndex = heap[base + 3];
|
|
501
400
|
this._flags = heap[base + 4];
|
|
502
|
-
this.editVersion = this.tree.editVersion;
|
|
503
|
-
}
|
|
504
|
-
/** @internal */
|
|
505
|
-
syncIndices() {
|
|
506
|
-
if (this.editVersion !== this.tree.editVersion) {
|
|
507
|
-
this._startIndex = C._ts_tree_cursor_start_index_wasm(this[0]) >>> 0;
|
|
508
|
-
this._endIndex = C._ts_tree_cursor_end_index_wasm(this[0]) >>> 0;
|
|
509
|
-
this.editVersion = this.tree.editVersion;
|
|
510
|
-
}
|
|
511
401
|
}
|
|
512
402
|
};
|
|
513
403
|
|
|
514
404
|
// src/tree.ts
|
|
515
|
-
function
|
|
516
|
-
if (tree.sourceText !== void 0) {
|
|
517
|
-
return tree.sourceText.slice(startIndex, endIndex);
|
|
518
|
-
}
|
|
519
|
-
const startPosition = getStartPosition();
|
|
405
|
+
function getCallbackText(textSource, startIndex, endIndex, startPosition) {
|
|
520
406
|
const length = endIndex - startIndex;
|
|
521
|
-
let result =
|
|
407
|
+
let result = textSource(startIndex, startPosition);
|
|
522
408
|
if (result) {
|
|
523
409
|
startIndex += result.length;
|
|
524
410
|
while (startIndex < endIndex) {
|
|
525
|
-
const string =
|
|
411
|
+
const string = textSource(startIndex, startPosition);
|
|
526
412
|
if (string && string.length > 0) {
|
|
527
413
|
startIndex += string.length;
|
|
528
414
|
result += string;
|
|
@@ -536,7 +422,7 @@ function getText(tree, startIndex, endIndex, getStartPosition) {
|
|
|
536
422
|
}
|
|
537
423
|
return result ?? "";
|
|
538
424
|
}
|
|
539
|
-
__name(
|
|
425
|
+
__name(getCallbackText, "getCallbackText");
|
|
540
426
|
var finalizer3 = newFinalizer((address) => {
|
|
541
427
|
C._ts_tree_delete(address);
|
|
542
428
|
});
|
|
@@ -548,26 +434,21 @@ var Tree2 = class _Tree {
|
|
|
548
434
|
[0] = 0;
|
|
549
435
|
// Internal handle for Wasm
|
|
550
436
|
/** @internal */
|
|
551
|
-
|
|
552
|
-
/** @internal */
|
|
553
|
-
sourceText;
|
|
554
|
-
/** @internal */
|
|
555
|
-
editVersion = 0;
|
|
437
|
+
textSource;
|
|
556
438
|
/** The language that was used to parse the syntax tree. */
|
|
557
439
|
language;
|
|
558
440
|
/** @internal */
|
|
559
|
-
constructor(internal, address, language,
|
|
441
|
+
constructor(internal, address, language, textSource) {
|
|
560
442
|
assertInternal(internal);
|
|
561
443
|
this[0] = address;
|
|
562
444
|
this.language = language;
|
|
563
|
-
this.
|
|
564
|
-
this.sourceText = sourceText;
|
|
445
|
+
this.textSource = textSource;
|
|
565
446
|
finalizer3?.register(this, address, this);
|
|
566
447
|
}
|
|
567
448
|
/** Create a shallow copy of the syntax tree. This is very fast. */
|
|
568
449
|
copy() {
|
|
569
450
|
const address = C._ts_tree_copy(this[0]);
|
|
570
|
-
return new _Tree(INTERNAL, address, this.language, this.
|
|
451
|
+
return new _Tree(INTERNAL, address, this.language, this.textSource);
|
|
571
452
|
}
|
|
572
453
|
/** Delete the syntax tree, freeing its resources. */
|
|
573
454
|
delete() {
|
|
@@ -591,42 +472,12 @@ var Tree2 = class _Tree {
|
|
|
591
472
|
C._ts_tree_root_node_with_offset_wasm(this[0]);
|
|
592
473
|
return unmarshalNode(this);
|
|
593
474
|
}
|
|
594
|
-
/**
|
|
595
|
-
* Edit the syntax tree to keep it in sync with source code that has been
|
|
596
|
-
* edited.
|
|
597
|
-
*
|
|
598
|
-
* You must describe the edit both in terms of byte offsets and in terms of
|
|
599
|
-
* row/column coordinates.
|
|
600
|
-
*/
|
|
601
|
-
edit(edit) {
|
|
602
|
-
marshalEdit(edit);
|
|
603
|
-
C._ts_tree_edit_wasm(this[0]);
|
|
604
|
-
this.editVersion++;
|
|
605
|
-
}
|
|
606
475
|
/** Create a new {@link TreeCursor} starting from the root of the tree. */
|
|
607
476
|
walk() {
|
|
608
477
|
C._ts_tree_root_node_wasm(this[0]);
|
|
609
478
|
const address = C._ts_tree_cursor_new_wasm(this[0]);
|
|
610
479
|
return new TreeCursor(INTERNAL, this, address);
|
|
611
480
|
}
|
|
612
|
-
/**
|
|
613
|
-
* Compare this old edited syntax tree to a new syntax tree representing
|
|
614
|
-
* the same document, returning a sequence of ranges whose syntactic
|
|
615
|
-
* structure has changed.
|
|
616
|
-
*
|
|
617
|
-
* For this to work correctly, this syntax tree must have been edited such
|
|
618
|
-
* that its ranges match up to the new tree. Generally, you'll want to
|
|
619
|
-
* call this method right after calling one of the [`Parser::parse`]
|
|
620
|
-
* functions. Call it on the old tree that was passed to parse, and
|
|
621
|
-
* pass the new tree that was returned from `parse`.
|
|
622
|
-
*/
|
|
623
|
-
getChangedRanges(other) {
|
|
624
|
-
if (!(other instanceof _Tree)) {
|
|
625
|
-
throw new TypeError("Argument must be a Tree");
|
|
626
|
-
}
|
|
627
|
-
C._ts_tree_get_changed_ranges_wasm(this[0], other[0]);
|
|
628
|
-
return unmarshalRanges();
|
|
629
|
-
}
|
|
630
481
|
/** Get the included ranges that were used to parse the syntax tree. */
|
|
631
482
|
getIncludedRanges() {
|
|
632
483
|
C._ts_tree_included_ranges_wasm(this[0]);
|
|
@@ -665,14 +516,7 @@ var Node = class {
|
|
|
665
516
|
/**
|
|
666
517
|
* The numeric id for this node that is unique.
|
|
667
518
|
*
|
|
668
|
-
* Within a given syntax tree, no two nodes have the same id.
|
|
669
|
-
*
|
|
670
|
-
* * If a new tree is created based on an older tree, and a node from the old tree is reused in
|
|
671
|
-
* the process, then that node will have the same id in both trees.
|
|
672
|
-
*
|
|
673
|
-
* * A node not marked as having changes does not guarantee it was reused.
|
|
674
|
-
*
|
|
675
|
-
* * If a node is marked as having changed in the old tree, it will not be reused.
|
|
519
|
+
* Within a given syntax tree, no two nodes have the same id.
|
|
676
520
|
*/
|
|
677
521
|
id;
|
|
678
522
|
/** The byte index where this node starts. */
|
|
@@ -745,11 +589,6 @@ var Node = class {
|
|
|
745
589
|
marshalNode(this);
|
|
746
590
|
return C._ts_node_is_missing_wasm(this.tree[0]) === 1;
|
|
747
591
|
}
|
|
748
|
-
/** Check if this node has been edited. */
|
|
749
|
-
get hasChanges() {
|
|
750
|
-
marshalNode(this);
|
|
751
|
-
return C._ts_node_has_changes_wasm(this.tree[0]) === 1;
|
|
752
|
-
}
|
|
753
592
|
/**
|
|
754
593
|
* Check if this node represents a syntax error or contains any syntax
|
|
755
594
|
* errors anywhere within it.
|
|
@@ -771,7 +610,8 @@ var Node = class {
|
|
|
771
610
|
}
|
|
772
611
|
/** Get the string content of this node. */
|
|
773
612
|
get text() {
|
|
774
|
-
|
|
613
|
+
const { textSource } = this.tree;
|
|
614
|
+
return typeof textSource === "string" ? textSource.slice(this.startIndex, this.endIndex) : getCallbackText(textSource, this.startIndex, this.endIndex, this.startPosition);
|
|
775
615
|
}
|
|
776
616
|
/** Get this node's parse state. */
|
|
777
617
|
get parseState() {
|
|
@@ -969,21 +809,21 @@ var Node = class {
|
|
|
969
809
|
symbols.push(65535);
|
|
970
810
|
}
|
|
971
811
|
const symbolsAddress = C._malloc(SIZE_OF_INT * symbols.length);
|
|
812
|
+
const symbolsHeap = C.HEAPU32;
|
|
972
813
|
const symbolsBase = symbolsAddress >>> 2;
|
|
973
814
|
for (let i2 = 0, n = symbols.length; i2 < n; i2++) {
|
|
974
|
-
|
|
815
|
+
symbolsHeap[symbolsBase + i2] = symbols[i2];
|
|
975
816
|
}
|
|
976
817
|
marshalNode(this);
|
|
818
|
+
const pointAddress = TRANSFER_BUFFER + SIZE_OF_NODE;
|
|
819
|
+
marshalPoint(pointAddress, startPosition);
|
|
820
|
+
marshalPoint(pointAddress + SIZE_OF_POINT, endPosition);
|
|
977
821
|
C._ts_node_descendants_of_type_wasm(
|
|
978
822
|
this.tree[0],
|
|
979
823
|
symbolsAddress,
|
|
980
|
-
symbols.length
|
|
981
|
-
startPosition.row,
|
|
982
|
-
startPosition.column,
|
|
983
|
-
endPosition.row,
|
|
984
|
-
endPosition.column
|
|
824
|
+
symbols.length
|
|
985
825
|
);
|
|
986
|
-
const result = unmarshalNodeArray(this.tree, true
|
|
826
|
+
const result = unmarshalNodeArray(this.tree, true);
|
|
987
827
|
C._free(symbolsAddress);
|
|
988
828
|
return result;
|
|
989
829
|
}
|
|
@@ -1052,8 +892,9 @@ var Node = class {
|
|
|
1052
892
|
}
|
|
1053
893
|
marshalNode(this);
|
|
1054
894
|
const base = TRANSFER_BUFFER + SIZE_OF_NODE >>> 2;
|
|
1055
|
-
C.HEAP32
|
|
1056
|
-
|
|
895
|
+
const heap = C.HEAP32;
|
|
896
|
+
heap[base] = start2;
|
|
897
|
+
heap[base + 1] = end;
|
|
1057
898
|
C._ts_node_descendant_for_index_wasm(this.tree[0]);
|
|
1058
899
|
return unmarshalNode(this.tree);
|
|
1059
900
|
}
|
|
@@ -1064,8 +905,9 @@ var Node = class {
|
|
|
1064
905
|
}
|
|
1065
906
|
marshalNode(this);
|
|
1066
907
|
const base = TRANSFER_BUFFER + SIZE_OF_NODE >>> 2;
|
|
1067
|
-
C.HEAP32
|
|
1068
|
-
|
|
908
|
+
const heap = C.HEAP32;
|
|
909
|
+
heap[base] = start2;
|
|
910
|
+
heap[base + 1] = end;
|
|
1069
911
|
C._ts_node_named_descendant_for_index_wasm(this.tree[0]);
|
|
1070
912
|
return unmarshalNode(this.tree);
|
|
1071
913
|
}
|
|
@@ -1104,20 +946,6 @@ var Node = class {
|
|
|
1104
946
|
const address = C._ts_tree_cursor_new_wasm(this.tree[0]);
|
|
1105
947
|
return new TreeCursor(INTERNAL, this.tree, address);
|
|
1106
948
|
}
|
|
1107
|
-
/**
|
|
1108
|
-
* Edit this node to keep it in-sync with source code that has been edited.
|
|
1109
|
-
*
|
|
1110
|
-
* This function is only rarely needed. When you edit a syntax tree with
|
|
1111
|
-
* the {@link Tree#edit} method, all of the nodes that you retrieve from
|
|
1112
|
-
* the tree afterward will already reflect the edit. You only need to
|
|
1113
|
-
* use {@link Node#edit} when you have a specific {@link Node} instance that
|
|
1114
|
-
* you want to keep and continue to use after an edit.
|
|
1115
|
-
*/
|
|
1116
|
-
edit(edit) {
|
|
1117
|
-
const { point, index } = edit.editPoint(this.startPosition, this.startIndex);
|
|
1118
|
-
this.startPosition = point;
|
|
1119
|
-
this.startIndex = index;
|
|
1120
|
-
}
|
|
1121
949
|
/** Get the S-expression representation of this node. */
|
|
1122
950
|
toString() {
|
|
1123
951
|
marshalNode(this);
|
|
@@ -1192,19 +1020,6 @@ function unmarshalRange(address) {
|
|
|
1192
1020
|
};
|
|
1193
1021
|
}
|
|
1194
1022
|
__name(unmarshalRange, "unmarshalRange");
|
|
1195
|
-
function marshalEdit(edit, address = TRANSFER_BUFFER) {
|
|
1196
|
-
marshalPoint(address, edit.startPosition);
|
|
1197
|
-
address += SIZE_OF_POINT;
|
|
1198
|
-
marshalPoint(address, edit.oldEndPosition);
|
|
1199
|
-
address += SIZE_OF_POINT;
|
|
1200
|
-
marshalPoint(address, edit.newEndPosition);
|
|
1201
|
-
const base = address + SIZE_OF_POINT >>> 2;
|
|
1202
|
-
const heap = C.HEAP32;
|
|
1203
|
-
heap[base] = edit.startIndex;
|
|
1204
|
-
heap[base + 1] = edit.oldEndIndex;
|
|
1205
|
-
heap[base + 2] = edit.newEndIndex;
|
|
1206
|
-
}
|
|
1207
|
-
__name(marshalEdit, "marshalEdit");
|
|
1208
1023
|
function unmarshalLanguageMetadata(address) {
|
|
1209
1024
|
const base = address >>> 2;
|
|
1210
1025
|
const heap = C.HEAP32;
|
|
@@ -1231,14 +1046,14 @@ function unmarshalSymbols() {
|
|
|
1231
1046
|
}
|
|
1232
1047
|
__name(unmarshalSymbols, "unmarshalSymbols");
|
|
1233
1048
|
function unmarshalRanges(useTsFree = true) {
|
|
1234
|
-
return unmarshalArray(SIZE_OF_RANGE, unmarshalRange, useTsFree
|
|
1049
|
+
return unmarshalArray(SIZE_OF_RANGE, unmarshalRange, useTsFree);
|
|
1235
1050
|
}
|
|
1236
1051
|
__name(unmarshalRanges, "unmarshalRanges");
|
|
1237
|
-
function unmarshalNodeArray(tree, useTsFree = false
|
|
1238
|
-
return unmarshalArray(SIZE_OF_NODE, (address) => unmarshalNode(tree, address), useTsFree
|
|
1052
|
+
function unmarshalNodeArray(tree, useTsFree = false) {
|
|
1053
|
+
return unmarshalArray(SIZE_OF_NODE, (address) => unmarshalNode(tree, address), useTsFree);
|
|
1239
1054
|
}
|
|
1240
1055
|
__name(unmarshalNodeArray, "unmarshalNodeArray");
|
|
1241
|
-
function unmarshalArray(stride, readItem, useTsFree
|
|
1056
|
+
function unmarshalArray(stride, readItem, useTsFree) {
|
|
1242
1057
|
const base = TRANSFER_BUFFER >>> 2;
|
|
1243
1058
|
const count = C.HEAPU32[base];
|
|
1244
1059
|
const buffer = C.HEAP32[base + 1];
|
|
@@ -1246,7 +1061,7 @@ function unmarshalArray(stride, readItem, useTsFree, alwaysFree) {
|
|
|
1246
1061
|
for (let i2 = 0, address = buffer; i2 < count; i2++, address += stride) {
|
|
1247
1062
|
result[i2] = readItem(address);
|
|
1248
1063
|
}
|
|
1249
|
-
if (
|
|
1064
|
+
if (buffer) {
|
|
1250
1065
|
if (useTsFree) C._ts_free_wasm(buffer);
|
|
1251
1066
|
else C._free(buffer);
|
|
1252
1067
|
}
|
|
@@ -1747,7 +1562,7 @@ async function Module2(moduleArg = {}) {
|
|
|
1747
1562
|
var b = wasmMemory.buffer;
|
|
1748
1563
|
HEAP8 = new Int8Array(b);
|
|
1749
1564
|
HEAP16 = new Int16Array(b);
|
|
1750
|
-
|
|
1565
|
+
HEAPU8 = new Uint8Array(b);
|
|
1751
1566
|
Module["HEAPU16"] = HEAPU16 = new Uint16Array(b);
|
|
1752
1567
|
Module["HEAP32"] = HEAP32 = new Int32Array(b);
|
|
1753
1568
|
Module["HEAPU32"] = HEAPU32 = new Uint32Array(b);
|
|
@@ -2215,7 +2030,7 @@ async function Module2(moduleArg = {}) {
|
|
|
2215
2030
|
newDSO("__main__", 0, wasmImports);
|
|
2216
2031
|
}
|
|
2217
2032
|
};
|
|
2218
|
-
var ___heap_base =
|
|
2033
|
+
var ___heap_base = 81952;
|
|
2219
2034
|
var alignMemory = /* @__PURE__ */ __name((size, alignment) => {
|
|
2220
2035
|
assert(alignment, "alignment argument is required");
|
|
2221
2036
|
return Math.ceil(size / alignment) * alignment;
|
|
@@ -2310,7 +2125,7 @@ async function Module2(moduleArg = {}) {
|
|
|
2310
2125
|
}, "convertJsFunctionToWasm");
|
|
2311
2126
|
var wasmTableMirror = [];
|
|
2312
2127
|
var wasmTable = new WebAssembly.Table({
|
|
2313
|
-
"initial":
|
|
2128
|
+
"initial": 58,
|
|
2314
2129
|
"element": "anyfunc"
|
|
2315
2130
|
});
|
|
2316
2131
|
var getWasmTableEntry = /* @__PURE__ */ __name((funcPtr) => {
|
|
@@ -2846,18 +2661,16 @@ async function Module2(moduleArg = {}) {
|
|
|
2846
2661
|
"value": "i32",
|
|
2847
2662
|
"mutable": false
|
|
2848
2663
|
}, 1024);
|
|
2849
|
-
var ___stack_high =
|
|
2850
|
-
var ___stack_low =
|
|
2664
|
+
var ___stack_high = 81952;
|
|
2665
|
+
var ___stack_low = 16416;
|
|
2851
2666
|
var ___stack_pointer = new WebAssembly.Global({
|
|
2852
2667
|
"value": "i32",
|
|
2853
2668
|
"mutable": true
|
|
2854
|
-
},
|
|
2669
|
+
}, 81952);
|
|
2855
2670
|
var ___table_base = new WebAssembly.Global({
|
|
2856
2671
|
"value": "i32",
|
|
2857
2672
|
"mutable": false
|
|
2858
2673
|
}, 1);
|
|
2859
|
-
var __abort_js = /* @__PURE__ */ __name(() => abort("native code called abort()"), "__abort_js");
|
|
2860
|
-
__abort_js.sig = "v";
|
|
2861
2674
|
var __emscripten_throw_longjmp = /* @__PURE__ */ __name(() => {
|
|
2862
2675
|
throw Infinity;
|
|
2863
2676
|
}, "__emscripten_throw_longjmp");
|
|
@@ -2960,18 +2773,29 @@ async function Module2(moduleArg = {}) {
|
|
|
2960
2773
|
}
|
|
2961
2774
|
}
|
|
2962
2775
|
__name(_tree_sitter_log_callback, "_tree_sitter_log_callback");
|
|
2963
|
-
function _tree_sitter_parse_callback(inputBufferAddress, index, row, column, lengthAddress) {
|
|
2964
|
-
const
|
|
2965
|
-
const
|
|
2776
|
+
function _tree_sitter_parse_callback(inputBufferAddress, maxCodeUnits, index, row, column, lengthAddress) {
|
|
2777
|
+
const source = Module.currentParseCallback;
|
|
2778
|
+
const isString = typeof source === "string";
|
|
2779
|
+
const chunk = isString ? source : source(index, {
|
|
2966
2780
|
row,
|
|
2967
2781
|
column
|
|
2968
2782
|
});
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2783
|
+
const offset = isString ? index : 0;
|
|
2784
|
+
const remaining = typeof chunk === "string" ? chunk.length - offset : 0;
|
|
2785
|
+
if (remaining <= 0) {
|
|
2786
|
+
HEAP32[SAFE_HEAP_INDEX(HEAP32, lengthAddress >>> 2, "storing")] = 0;
|
|
2787
|
+
return;
|
|
2788
|
+
}
|
|
2789
|
+
let count = remaining < maxCodeUnits ? remaining : maxCodeUnits;
|
|
2790
|
+
if (count < remaining && count > 1) {
|
|
2791
|
+
const last = chunk.charCodeAt(offset + count - 1);
|
|
2792
|
+
if (last >= 55296 && last <= 56319) count--;
|
|
2974
2793
|
}
|
|
2794
|
+
const base = inputBufferAddress >>> 1;
|
|
2795
|
+
for (let i2 = 0; i2 < count; i2++) {
|
|
2796
|
+
HEAPU16[SAFE_HEAP_INDEX(HEAPU16, base + i2, "storing")] = chunk.charCodeAt(offset + i2);
|
|
2797
|
+
}
|
|
2798
|
+
HEAP32[SAFE_HEAP_INDEX(HEAP32, lengthAddress >>> 2, "storing")] = count;
|
|
2975
2799
|
}
|
|
2976
2800
|
__name(_tree_sitter_parse_callback, "_tree_sitter_parse_callback");
|
|
2977
2801
|
function _tree_sitter_progress_callback(currentOffset, hasError) {
|
|
@@ -3085,22 +2909,6 @@ async function Module2(moduleArg = {}) {
|
|
|
3085
2909
|
str += String.fromCharCode(ch);
|
|
3086
2910
|
}
|
|
3087
2911
|
}, "AsciiToString");
|
|
3088
|
-
var stringToUTF16 = /* @__PURE__ */ __name((str, outPtr, maxBytesToWrite) => {
|
|
3089
|
-
assert(outPtr % 2 == 0, "Pointer passed to stringToUTF16 must be aligned to two bytes!");
|
|
3090
|
-
assert(typeof maxBytesToWrite == "number", "stringToUTF16(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!");
|
|
3091
|
-
maxBytesToWrite ??= 2147483647;
|
|
3092
|
-
if (maxBytesToWrite < 2) return 0;
|
|
3093
|
-
maxBytesToWrite -= 2;
|
|
3094
|
-
var startPtr = outPtr;
|
|
3095
|
-
var numCharsToWrite = maxBytesToWrite < str.length * 2 ? maxBytesToWrite / 2 : str.length;
|
|
3096
|
-
for (var i2 = 0; i2 < numCharsToWrite; ++i2) {
|
|
3097
|
-
var codeUnit = str.charCodeAt(i2);
|
|
3098
|
-
HEAP16[SAFE_HEAP_INDEX(HEAP16, outPtr >> 1, "storing")] = codeUnit;
|
|
3099
|
-
outPtr += 2;
|
|
3100
|
-
}
|
|
3101
|
-
HEAP16[SAFE_HEAP_INDEX(HEAP16, outPtr >> 1, "storing")] = 0;
|
|
3102
|
-
return outPtr - startPtr;
|
|
3103
|
-
}, "stringToUTF16");
|
|
3104
2912
|
{
|
|
3105
2913
|
initMemory();
|
|
3106
2914
|
if (Module["noExitRuntime"]) noExitRuntime = Module["noExitRuntime"];
|
|
@@ -3136,11 +2944,10 @@ async function Module2(moduleArg = {}) {
|
|
|
3136
2944
|
Module["stringToUTF8"] = stringToUTF8;
|
|
3137
2945
|
Module["lengthBytesUTF8"] = lengthBytesUTF8;
|
|
3138
2946
|
Module["AsciiToString"] = AsciiToString;
|
|
3139
|
-
Module["stringToUTF16"] = stringToUTF16;
|
|
3140
2947
|
Module["loadWebAssemblyModule"] = loadWebAssemblyModule;
|
|
3141
|
-
var missingLibrarySymbols = ["writeI53ToI64", "writeI53ToI64Clamped", "writeI53ToI64Signaling", "writeI53ToU64Clamped", "writeI53ToU64Signaling", "readI53FromI64", "readI53FromU64", "convertI32PairToI53", "convertI32PairToI53Checked", "convertU32PairToI53", "getTempRet0", "setTempRet0", "zeroMemory", "withStackSave", "strError", "inetPton4", "inetNtop4", "inetPton6", "inetNtop6", "readSockaddr", "writeSockaddr", "readEmAsmArgs", "runEmAsmFunction", "runMainThreadEmAsm", "jstoi_q", "getExecutableName", "autoResumeAudioContext", "getDynCaller", "runtimeKeepalivePush", "runtimeKeepalivePop", "callUserCallback", "maybeExit", "asmjsMangle", "mmapAlloc", "HandleAllocator", "getNativeTypeSize", "getUniqueRunDependency", "addOnInit", "addOnPreMain", "addOnExit", "STACK_SIZE", "STACK_ALIGN", "POINTER_SIZE", "ASSERTIONS", "ccall", "cwrap", "removeFunction", "intArrayFromString", "intArrayToString", "stringToAscii", "UTF16ToString", "lengthBytesUTF16", "UTF32ToString", "stringToUTF32", "lengthBytesUTF32", "stringToNewUTF8", "writeArrayToMemory", "registerKeyEventCallback", "maybeCStringToJsString", "findEventTarget", "getBoundingClientRect", "fillMouseEventData", "registerMouseEventCallback", "registerWheelEventCallback", "registerUiEventCallback", "registerFocusEventCallback", "fillDeviceOrientationEventData", "registerDeviceOrientationEventCallback", "fillDeviceMotionEventData", "registerDeviceMotionEventCallback", "screenOrientation", "fillOrientationChangeEventData", "registerOrientationChangeEventCallback", "fillFullscreenChangeEventData", "registerFullscreenChangeEventCallback", "JSEvents_requestFullscreen", "JSEvents_resizeCanvasForFullscreen", "registerRestoreOldStyle", "hideEverythingExceptGivenElement", "restoreHiddenElements", "setLetterbox", "softFullscreenResizeWebGLRenderTarget", "doRequestFullscreen", "fillPointerlockChangeEventData", "registerPointerlockChangeEventCallback", "registerPointerlockErrorEventCallback", "requestPointerLock", "fillVisibilityChangeEventData", "registerVisibilityChangeEventCallback", "registerTouchEventCallback", "fillGamepadEventData", "registerGamepadEventCallback", "registerBeforeUnloadEventCallback", "fillBatteryEventData", "registerBatteryEventCallback", "setCanvasElementSize", "getCanvasElementSize", "jsStackTrace", "getCallstack", "convertPCtoSourceLocation", "getEnvStrings", "checkWasiClock", "wasiRightsToMuslOFlags", "wasiOFlagsToMuslOFlags", "initRandomFill", "randomFill", "safeSetTimeout", "setImmediateWrapped", "safeRequestAnimationFrame", "clearImmediateWrapped", "registerPostMainLoop", "registerPreMainLoop", "getPromise", "makePromise", "idsToPromises", "makePromiseCallback", "Browser_asyncPrepareDataCounter", "isLeapYear", "ydayFromDate", "arraySum", "addDays", "getSocketFromFD", "getSocketAddress", "dlopenInternal", "heapObjectForWebGLType", "toTypedArrayIndex", "webgl_enable_ANGLE_instanced_arrays", "webgl_enable_OES_vertex_array_object", "webgl_enable_WEBGL_draw_buffers", "webgl_enable_WEBGL_multi_draw", "webgl_enable_EXT_polygon_offset_clamp", "webgl_enable_EXT_clip_control", "webgl_enable_WEBGL_polygon_mode", "emscriptenWebGLGet", "computeUnpackAlignedImageSize", "colorChannelsInGlTextureFormat", "emscriptenWebGLGetTexPixelData", "emscriptenWebGLGetUniform", "webglGetUniformLocation", "webglPrepareUniformLocationsBeforeFirstUse", "webglGetLeftBracePos", "emscriptenWebGLGetVertexAttrib", "__glGetActiveAttribOrUniform", "writeGLArray", "registerWebGlEventCallback", "runAndAbortIfError", "ALLOC_NORMAL", "ALLOC_STACK", "allocate", "writeStringToMemory", "writeAsciiToMemory", "demangle", "stackTrace"];
|
|
2948
|
+
var missingLibrarySymbols = ["writeI53ToI64", "writeI53ToI64Clamped", "writeI53ToI64Signaling", "writeI53ToU64Clamped", "writeI53ToU64Signaling", "readI53FromI64", "readI53FromU64", "convertI32PairToI53", "convertI32PairToI53Checked", "convertU32PairToI53", "getTempRet0", "setTempRet0", "zeroMemory", "withStackSave", "strError", "inetPton4", "inetNtop4", "inetPton6", "inetNtop6", "readSockaddr", "writeSockaddr", "readEmAsmArgs", "runEmAsmFunction", "runMainThreadEmAsm", "jstoi_q", "getExecutableName", "autoResumeAudioContext", "getDynCaller", "runtimeKeepalivePush", "runtimeKeepalivePop", "callUserCallback", "maybeExit", "asmjsMangle", "mmapAlloc", "HandleAllocator", "getNativeTypeSize", "getUniqueRunDependency", "addOnInit", "addOnPreMain", "addOnExit", "STACK_SIZE", "STACK_ALIGN", "POINTER_SIZE", "ASSERTIONS", "ccall", "cwrap", "removeFunction", "intArrayFromString", "intArrayToString", "stringToAscii", "UTF16ToString", "stringToUTF16", "lengthBytesUTF16", "UTF32ToString", "stringToUTF32", "lengthBytesUTF32", "stringToNewUTF8", "writeArrayToMemory", "registerKeyEventCallback", "maybeCStringToJsString", "findEventTarget", "getBoundingClientRect", "fillMouseEventData", "registerMouseEventCallback", "registerWheelEventCallback", "registerUiEventCallback", "registerFocusEventCallback", "fillDeviceOrientationEventData", "registerDeviceOrientationEventCallback", "fillDeviceMotionEventData", "registerDeviceMotionEventCallback", "screenOrientation", "fillOrientationChangeEventData", "registerOrientationChangeEventCallback", "fillFullscreenChangeEventData", "registerFullscreenChangeEventCallback", "JSEvents_requestFullscreen", "JSEvents_resizeCanvasForFullscreen", "registerRestoreOldStyle", "hideEverythingExceptGivenElement", "restoreHiddenElements", "setLetterbox", "softFullscreenResizeWebGLRenderTarget", "doRequestFullscreen", "fillPointerlockChangeEventData", "registerPointerlockChangeEventCallback", "registerPointerlockErrorEventCallback", "requestPointerLock", "fillVisibilityChangeEventData", "registerVisibilityChangeEventCallback", "registerTouchEventCallback", "fillGamepadEventData", "registerGamepadEventCallback", "registerBeforeUnloadEventCallback", "fillBatteryEventData", "registerBatteryEventCallback", "setCanvasElementSize", "getCanvasElementSize", "jsStackTrace", "getCallstack", "convertPCtoSourceLocation", "getEnvStrings", "checkWasiClock", "wasiRightsToMuslOFlags", "wasiOFlagsToMuslOFlags", "initRandomFill", "randomFill", "safeSetTimeout", "setImmediateWrapped", "safeRequestAnimationFrame", "clearImmediateWrapped", "registerPostMainLoop", "registerPreMainLoop", "getPromise", "makePromise", "idsToPromises", "makePromiseCallback", "Browser_asyncPrepareDataCounter", "isLeapYear", "ydayFromDate", "arraySum", "addDays", "getSocketFromFD", "getSocketAddress", "dlopenInternal", "heapObjectForWebGLType", "toTypedArrayIndex", "webgl_enable_ANGLE_instanced_arrays", "webgl_enable_OES_vertex_array_object", "webgl_enable_WEBGL_draw_buffers", "webgl_enable_WEBGL_multi_draw", "webgl_enable_EXT_polygon_offset_clamp", "webgl_enable_EXT_clip_control", "webgl_enable_WEBGL_polygon_mode", "emscriptenWebGLGet", "computeUnpackAlignedImageSize", "colorChannelsInGlTextureFormat", "emscriptenWebGLGetTexPixelData", "emscriptenWebGLGetUniform", "webglGetUniformLocation", "webglPrepareUniformLocationsBeforeFirstUse", "webglGetLeftBracePos", "emscriptenWebGLGetVertexAttrib", "__glGetActiveAttribOrUniform", "writeGLArray", "registerWebGlEventCallback", "runAndAbortIfError", "ALLOC_NORMAL", "ALLOC_STACK", "allocate", "writeStringToMemory", "writeAsciiToMemory", "demangle", "stackTrace"];
|
|
3142
2949
|
missingLibrarySymbols.forEach(missingLibrarySymbol);
|
|
3143
|
-
var unexportedSymbols = ["run", "out", "err", "callMain", "abort", "wasmMemory", "wasmExports", "HEAPF32", "HEAPF64", "HEAP8", "HEAP16", "HEAP64", "HEAPU64", "writeStackCookie", "checkStackCookie", "INT53_MAX", "INT53_MIN", "bigintToI53Checked", "stackSave", "stackRestore", "stackAlloc", "ptrToString", "exitJS", "getHeapMax", "growMemory", "ENV", "ERRNO_CODES", "DNS", "Protocols", "Sockets", "timers", "warnOnce", "readEmAsmArgsArray", "dynCall", "handleException", "keepRuntimeAlive", "asyncLoad", "alignMemory", "wasmTable", "noExitRuntime", "addRunDependency", "removeRunDependency", "addOnPreRun", "addOnPostCtor", "addOnPostRun", "convertJsFunctionToWasm", "freeTableIndexes", "functionsInTableMap", "getEmptyTableSlot", "updateTableMap", "getFunctionAddress", "addFunction", "setValue", "getValue", "PATH", "PATH_FS", "UTF8Decoder", "UTF8ArrayToString", "stringToUTF8Array", "UTF16Decoder", "stringToUTF8OnStack", "JSEvents", "specialHTMLTargets", "findCanvasEventTarget", "currentFullscreenStrategy", "restoreOldWindowedStyle", "UNWIND_CACHE", "ExitStatus", "flush_NO_FILESYSTEM", "emSetImmediate", "emClearImmediate_deps", "emClearImmediate", "promiseMap", "Browser", "requestFullscreen", "requestFullScreen", "setCanvasSize", "getUserMedia", "createContext", "getPreloadedImageData__data", "wget", "MONTH_DAYS_REGULAR", "MONTH_DAYS_LEAP", "MONTH_DAYS_REGULAR_CUMULATIVE", "MONTH_DAYS_LEAP_CUMULATIVE", "SYSCALLS", "isSymbolDefined", "GOT", "currentModuleWeakSymbols", "LDSO", "getMemory", "mergeLibSymbols", "newDSO", "loadDynamicLibrary", "tempFixedLengthArray", "miniTempWebGLFloatBuffers", "miniTempWebGLIntBuffers", "GL", "AL", "GLUT", "EGL", "GLEW", "IDBStore", "SDL", "SDL_gfx", "allocateUTF8", "allocateUTF8OnStack", "print", "printErr", "jstoi_s"];
|
|
2950
|
+
var unexportedSymbols = ["run", "out", "err", "callMain", "abort", "wasmMemory", "wasmExports", "HEAPF32", "HEAPF64", "HEAP8", "HEAPU8", "HEAP16", "HEAP64", "HEAPU64", "writeStackCookie", "checkStackCookie", "INT53_MAX", "INT53_MIN", "bigintToI53Checked", "stackSave", "stackRestore", "stackAlloc", "ptrToString", "exitJS", "getHeapMax", "growMemory", "ENV", "ERRNO_CODES", "DNS", "Protocols", "Sockets", "timers", "warnOnce", "readEmAsmArgsArray", "dynCall", "handleException", "keepRuntimeAlive", "asyncLoad", "alignMemory", "wasmTable", "noExitRuntime", "addRunDependency", "removeRunDependency", "addOnPreRun", "addOnPostCtor", "addOnPostRun", "convertJsFunctionToWasm", "freeTableIndexes", "functionsInTableMap", "getEmptyTableSlot", "updateTableMap", "getFunctionAddress", "addFunction", "setValue", "getValue", "PATH", "PATH_FS", "UTF8Decoder", "UTF8ArrayToString", "stringToUTF8Array", "UTF16Decoder", "stringToUTF8OnStack", "JSEvents", "specialHTMLTargets", "findCanvasEventTarget", "currentFullscreenStrategy", "restoreOldWindowedStyle", "UNWIND_CACHE", "ExitStatus", "flush_NO_FILESYSTEM", "emSetImmediate", "emClearImmediate_deps", "emClearImmediate", "promiseMap", "Browser", "requestFullscreen", "requestFullScreen", "setCanvasSize", "getUserMedia", "createContext", "getPreloadedImageData__data", "wget", "MONTH_DAYS_REGULAR", "MONTH_DAYS_LEAP", "MONTH_DAYS_REGULAR_CUMULATIVE", "MONTH_DAYS_LEAP_CUMULATIVE", "SYSCALLS", "isSymbolDefined", "GOT", "currentModuleWeakSymbols", "LDSO", "getMemory", "mergeLibSymbols", "newDSO", "loadDynamicLibrary", "tempFixedLengthArray", "miniTempWebGLFloatBuffers", "miniTempWebGLIntBuffers", "GL", "AL", "GLUT", "EGL", "GLEW", "IDBStore", "SDL", "SDL_gfx", "allocateUTF8", "allocateUTF8OnStack", "print", "printErr", "jstoi_s"];
|
|
3144
2951
|
unexportedSymbols.forEach(unexportedRuntimeSymbol);
|
|
3145
2952
|
function checkIncomingModuleAPI() {
|
|
3146
2953
|
ignoredModuleProp("fetchSettings");
|
|
@@ -3151,7 +2958,6 @@ async function Module2(moduleArg = {}) {
|
|
|
3151
2958
|
var _calloc = Module["_calloc"] = makeInvalidEarlyAccess("_calloc");
|
|
3152
2959
|
var _realloc = Module["_realloc"] = makeInvalidEarlyAccess("_realloc");
|
|
3153
2960
|
var _free = Module["_free"] = makeInvalidEarlyAccess("_free");
|
|
3154
|
-
var _ts_range_edit = Module["_ts_range_edit"] = makeInvalidEarlyAccess("_ts_range_edit");
|
|
3155
2961
|
var _ts_language_symbol_count = Module["_ts_language_symbol_count"] = makeInvalidEarlyAccess("_ts_language_symbol_count");
|
|
3156
2962
|
var _ts_language_state_count = Module["_ts_language_state_count"] = makeInvalidEarlyAccess("_ts_language_state_count");
|
|
3157
2963
|
var _ts_language_abi_version = Module["_ts_language_abi_version"] = makeInvalidEarlyAccess("_ts_language_abi_version");
|
|
@@ -3169,12 +2975,12 @@ async function Module2(moduleArg = {}) {
|
|
|
3169
2975
|
var _ts_lookahead_iterator_reset = Module["_ts_lookahead_iterator_reset"] = makeInvalidEarlyAccess("_ts_lookahead_iterator_reset");
|
|
3170
2976
|
var _ts_lookahead_iterator_next = Module["_ts_lookahead_iterator_next"] = makeInvalidEarlyAccess("_ts_lookahead_iterator_next");
|
|
3171
2977
|
var _ts_lookahead_iterator_current_symbol = Module["_ts_lookahead_iterator_current_symbol"] = makeInvalidEarlyAccess("_ts_lookahead_iterator_current_symbol");
|
|
3172
|
-
var _ts_point_edit = Module["_ts_point_edit"] = makeInvalidEarlyAccess("_ts_point_edit");
|
|
3173
2978
|
var _ts_parser_delete = Module["_ts_parser_delete"] = makeInvalidEarlyAccess("_ts_parser_delete");
|
|
3174
2979
|
var _ts_parser_set_language = Module["_ts_parser_set_language"] = makeInvalidEarlyAccess("_ts_parser_set_language");
|
|
3175
2980
|
var _ts_parser_reset = Module["_ts_parser_reset"] = makeInvalidEarlyAccess("_ts_parser_reset");
|
|
3176
|
-
var _ts_parser_set_included_ranges = Module["_ts_parser_set_included_ranges"] = makeInvalidEarlyAccess("_ts_parser_set_included_ranges");
|
|
3177
2981
|
var _memcmp = Module["_memcmp"] = makeInvalidEarlyAccess("_memcmp");
|
|
2982
|
+
var _ts_tree_cursor_current_descendant_index = Module["_ts_tree_cursor_current_descendant_index"] = makeInvalidEarlyAccess("_ts_tree_cursor_current_descendant_index");
|
|
2983
|
+
var _ts_tree_cursor_current_depth = Module["_ts_tree_cursor_current_depth"] = makeInvalidEarlyAccess("_ts_tree_cursor_current_depth");
|
|
3178
2984
|
var _ts_tree_copy = Module["_ts_tree_copy"] = makeInvalidEarlyAccess("_ts_tree_copy");
|
|
3179
2985
|
var _ts_tree_delete = Module["_ts_tree_delete"] = makeInvalidEarlyAccess("_ts_tree_delete");
|
|
3180
2986
|
var _ts_init = Module["_ts_init"] = makeInvalidEarlyAccess("_ts_init");
|
|
@@ -3196,9 +3002,7 @@ async function Module2(moduleArg = {}) {
|
|
|
3196
3002
|
var _ts_language_subtypes_wasm = Module["_ts_language_subtypes_wasm"] = makeInvalidEarlyAccess("_ts_language_subtypes_wasm");
|
|
3197
3003
|
var _ts_tree_root_node_wasm = Module["_ts_tree_root_node_wasm"] = makeInvalidEarlyAccess("_ts_tree_root_node_wasm");
|
|
3198
3004
|
var _ts_tree_root_node_with_offset_wasm = Module["_ts_tree_root_node_with_offset_wasm"] = makeInvalidEarlyAccess("_ts_tree_root_node_with_offset_wasm");
|
|
3199
|
-
var _ts_tree_edit_wasm = Module["_ts_tree_edit_wasm"] = makeInvalidEarlyAccess("_ts_tree_edit_wasm");
|
|
3200
3005
|
var _ts_tree_included_ranges_wasm = Module["_ts_tree_included_ranges_wasm"] = makeInvalidEarlyAccess("_ts_tree_included_ranges_wasm");
|
|
3201
|
-
var _ts_tree_get_changed_ranges_wasm = Module["_ts_tree_get_changed_ranges_wasm"] = makeInvalidEarlyAccess("_ts_tree_get_changed_ranges_wasm");
|
|
3202
3006
|
var _ts_tree_cursor_new_wasm = Module["_ts_tree_cursor_new_wasm"] = makeInvalidEarlyAccess("_ts_tree_cursor_new_wasm");
|
|
3203
3007
|
var _ts_tree_cursor_copy_wasm = Module["_ts_tree_cursor_copy_wasm"] = makeInvalidEarlyAccess("_ts_tree_cursor_copy_wasm");
|
|
3204
3008
|
var _ts_tree_cursor_delete_wasm = Module["_ts_tree_cursor_delete_wasm"] = makeInvalidEarlyAccess("_ts_tree_cursor_delete_wasm");
|
|
@@ -3216,10 +3020,6 @@ async function Module2(moduleArg = {}) {
|
|
|
3216
3020
|
var _ts_tree_cursor_current_node_id_wasm = Module["_ts_tree_cursor_current_node_id_wasm"] = makeInvalidEarlyAccess("_ts_tree_cursor_current_node_id_wasm");
|
|
3217
3021
|
var _ts_tree_cursor_start_position_wasm = Module["_ts_tree_cursor_start_position_wasm"] = makeInvalidEarlyAccess("_ts_tree_cursor_start_position_wasm");
|
|
3218
3022
|
var _ts_tree_cursor_end_position_wasm = Module["_ts_tree_cursor_end_position_wasm"] = makeInvalidEarlyAccess("_ts_tree_cursor_end_position_wasm");
|
|
3219
|
-
var _ts_tree_cursor_start_index_wasm = Module["_ts_tree_cursor_start_index_wasm"] = makeInvalidEarlyAccess("_ts_tree_cursor_start_index_wasm");
|
|
3220
|
-
var _ts_tree_cursor_end_index_wasm = Module["_ts_tree_cursor_end_index_wasm"] = makeInvalidEarlyAccess("_ts_tree_cursor_end_index_wasm");
|
|
3221
|
-
var _ts_tree_cursor_current_depth_wasm = Module["_ts_tree_cursor_current_depth_wasm"] = makeInvalidEarlyAccess("_ts_tree_cursor_current_depth_wasm");
|
|
3222
|
-
var _ts_tree_cursor_current_descendant_index_wasm = Module["_ts_tree_cursor_current_descendant_index_wasm"] = makeInvalidEarlyAccess("_ts_tree_cursor_current_descendant_index_wasm");
|
|
3223
3023
|
var _ts_tree_cursor_current_node_wasm = Module["_ts_tree_cursor_current_node_wasm"] = makeInvalidEarlyAccess("_ts_tree_cursor_current_node_wasm");
|
|
3224
3024
|
var _ts_node_symbol_wasm = Module["_ts_node_symbol_wasm"] = makeInvalidEarlyAccess("_ts_node_symbol_wasm");
|
|
3225
3025
|
var _ts_node_field_name_for_child_wasm = Module["_ts_node_field_name_for_child_wasm"] = makeInvalidEarlyAccess("_ts_node_field_name_for_child_wasm");
|
|
@@ -3244,25 +3044,22 @@ async function Module2(moduleArg = {}) {
|
|
|
3244
3044
|
var _ts_node_named_descendant_for_index_wasm = Module["_ts_node_named_descendant_for_index_wasm"] = makeInvalidEarlyAccess("_ts_node_named_descendant_for_index_wasm");
|
|
3245
3045
|
var _ts_node_descendant_for_position_wasm = Module["_ts_node_descendant_for_position_wasm"] = makeInvalidEarlyAccess("_ts_node_descendant_for_position_wasm");
|
|
3246
3046
|
var _ts_node_named_descendant_for_position_wasm = Module["_ts_node_named_descendant_for_position_wasm"] = makeInvalidEarlyAccess("_ts_node_named_descendant_for_position_wasm");
|
|
3247
|
-
var _ts_node_start_point_wasm = Module["_ts_node_start_point_wasm"] = makeInvalidEarlyAccess("_ts_node_start_point_wasm");
|
|
3248
3047
|
var _ts_node_end_point_wasm = Module["_ts_node_end_point_wasm"] = makeInvalidEarlyAccess("_ts_node_end_point_wasm");
|
|
3249
|
-
var _ts_node_start_index_wasm = Module["_ts_node_start_index_wasm"] = makeInvalidEarlyAccess("_ts_node_start_index_wasm");
|
|
3250
3048
|
var _ts_node_end_index_wasm = Module["_ts_node_end_index_wasm"] = makeInvalidEarlyAccess("_ts_node_end_index_wasm");
|
|
3251
3049
|
var _ts_node_to_string_wasm = Module["_ts_node_to_string_wasm"] = makeInvalidEarlyAccess("_ts_node_to_string_wasm");
|
|
3252
3050
|
var _ts_node_children_wasm = Module["_ts_node_children_wasm"] = makeInvalidEarlyAccess("_ts_node_children_wasm");
|
|
3253
3051
|
var _ts_node_named_children_wasm = Module["_ts_node_named_children_wasm"] = makeInvalidEarlyAccess("_ts_node_named_children_wasm");
|
|
3254
3052
|
var _ts_node_descendants_of_type_wasm = Module["_ts_node_descendants_of_type_wasm"] = makeInvalidEarlyAccess("_ts_node_descendants_of_type_wasm");
|
|
3255
3053
|
var _ts_node_is_named_wasm = Module["_ts_node_is_named_wasm"] = makeInvalidEarlyAccess("_ts_node_is_named_wasm");
|
|
3256
|
-
var _ts_node_has_changes_wasm = Module["_ts_node_has_changes_wasm"] = makeInvalidEarlyAccess("_ts_node_has_changes_wasm");
|
|
3257
3054
|
var _ts_node_has_error_wasm = Module["_ts_node_has_error_wasm"] = makeInvalidEarlyAccess("_ts_node_has_error_wasm");
|
|
3258
3055
|
var _ts_node_is_error_wasm = Module["_ts_node_is_error_wasm"] = makeInvalidEarlyAccess("_ts_node_is_error_wasm");
|
|
3259
3056
|
var _ts_node_is_missing_wasm = Module["_ts_node_is_missing_wasm"] = makeInvalidEarlyAccess("_ts_node_is_missing_wasm");
|
|
3260
3057
|
var _ts_node_is_extra_wasm = Module["_ts_node_is_extra_wasm"] = makeInvalidEarlyAccess("_ts_node_is_extra_wasm");
|
|
3261
3058
|
var _ts_node_parse_state_wasm = Module["_ts_node_parse_state_wasm"] = makeInvalidEarlyAccess("_ts_node_parse_state_wasm");
|
|
3262
3059
|
var _ts_node_next_parse_state_wasm = Module["_ts_node_next_parse_state_wasm"] = makeInvalidEarlyAccess("_ts_node_next_parse_state_wasm");
|
|
3263
|
-
var _memset = Module["_memset"] = makeInvalidEarlyAccess("_memset");
|
|
3264
3060
|
var _memcpy = Module["_memcpy"] = makeInvalidEarlyAccess("_memcpy");
|
|
3265
3061
|
var _memmove = Module["_memmove"] = makeInvalidEarlyAccess("_memmove");
|
|
3062
|
+
var _memset = Module["_memset"] = makeInvalidEarlyAccess("_memset");
|
|
3266
3063
|
var _fflush = makeInvalidEarlyAccess("_fflush");
|
|
3267
3064
|
var _strlen = Module["_strlen"] = makeInvalidEarlyAccess("_strlen");
|
|
3268
3065
|
var _iswalnum = Module["_iswalnum"] = makeInvalidEarlyAccess("_iswalnum");
|
|
@@ -3296,7 +3093,6 @@ async function Module2(moduleArg = {}) {
|
|
|
3296
3093
|
Module["_calloc"] = _calloc = createExportWrapper("calloc", 2);
|
|
3297
3094
|
Module["_realloc"] = _realloc = createExportWrapper("realloc", 2);
|
|
3298
3095
|
Module["_free"] = _free = createExportWrapper("free", 1);
|
|
3299
|
-
Module["_ts_range_edit"] = _ts_range_edit = createExportWrapper("ts_range_edit", 2);
|
|
3300
3096
|
Module["_ts_language_symbol_count"] = _ts_language_symbol_count = createExportWrapper("ts_language_symbol_count", 1);
|
|
3301
3097
|
Module["_ts_language_state_count"] = _ts_language_state_count = createExportWrapper("ts_language_state_count", 1);
|
|
3302
3098
|
Module["_ts_language_abi_version"] = _ts_language_abi_version = createExportWrapper("ts_language_abi_version", 1);
|
|
@@ -3314,12 +3110,12 @@ async function Module2(moduleArg = {}) {
|
|
|
3314
3110
|
Module["_ts_lookahead_iterator_reset"] = _ts_lookahead_iterator_reset = createExportWrapper("ts_lookahead_iterator_reset", 3);
|
|
3315
3111
|
Module["_ts_lookahead_iterator_next"] = _ts_lookahead_iterator_next = createExportWrapper("ts_lookahead_iterator_next", 1);
|
|
3316
3112
|
Module["_ts_lookahead_iterator_current_symbol"] = _ts_lookahead_iterator_current_symbol = createExportWrapper("ts_lookahead_iterator_current_symbol", 1);
|
|
3317
|
-
Module["_ts_point_edit"] = _ts_point_edit = createExportWrapper("ts_point_edit", 3);
|
|
3318
3113
|
Module["_ts_parser_delete"] = _ts_parser_delete = createExportWrapper("ts_parser_delete", 1);
|
|
3319
3114
|
Module["_ts_parser_set_language"] = _ts_parser_set_language = createExportWrapper("ts_parser_set_language", 2);
|
|
3320
3115
|
Module["_ts_parser_reset"] = _ts_parser_reset = createExportWrapper("ts_parser_reset", 1);
|
|
3321
|
-
Module["_ts_parser_set_included_ranges"] = _ts_parser_set_included_ranges = createExportWrapper("ts_parser_set_included_ranges", 3);
|
|
3322
3116
|
Module["_memcmp"] = _memcmp = createExportWrapper("memcmp", 3);
|
|
3117
|
+
Module["_ts_tree_cursor_current_descendant_index"] = _ts_tree_cursor_current_descendant_index = createExportWrapper("ts_tree_cursor_current_descendant_index", 1);
|
|
3118
|
+
Module["_ts_tree_cursor_current_depth"] = _ts_tree_cursor_current_depth = createExportWrapper("ts_tree_cursor_current_depth", 1);
|
|
3323
3119
|
Module["_ts_tree_copy"] = _ts_tree_copy = createExportWrapper("ts_tree_copy", 1);
|
|
3324
3120
|
Module["_ts_tree_delete"] = _ts_tree_delete = createExportWrapper("ts_tree_delete", 1);
|
|
3325
3121
|
Module["_ts_init"] = _ts_init = createExportWrapper("ts_init", 0);
|
|
@@ -3329,7 +3125,7 @@ async function Module2(moduleArg = {}) {
|
|
|
3329
3125
|
Module["_ts_scanner_realloc_wasm"] = _ts_scanner_realloc_wasm = createExportWrapper("ts_scanner_realloc_wasm", 2);
|
|
3330
3126
|
Module["_ts_parser_new_wasm"] = _ts_parser_new_wasm = createExportWrapper("ts_parser_new_wasm", 0);
|
|
3331
3127
|
Module["_ts_parser_enable_logger_wasm"] = _ts_parser_enable_logger_wasm = createExportWrapper("ts_parser_enable_logger_wasm", 2);
|
|
3332
|
-
Module["_ts_parser_parse_wasm"] = _ts_parser_parse_wasm = createExportWrapper("ts_parser_parse_wasm",
|
|
3128
|
+
Module["_ts_parser_parse_wasm"] = _ts_parser_parse_wasm = createExportWrapper("ts_parser_parse_wasm", 2);
|
|
3333
3129
|
Module["_ts_parser_parse_limited_wasm"] = _ts_parser_parse_limited_wasm = createExportWrapper("ts_parser_parse_limited_wasm", 2);
|
|
3334
3130
|
Module["_ts_parser_last_parse_operations_wasm"] = _ts_parser_last_parse_operations_wasm = createExportWrapper("ts_parser_last_parse_operations_wasm", 1);
|
|
3335
3131
|
Module["_ts_parser_abort_limited_wasm"] = _ts_parser_abort_limited_wasm = createExportWrapper("ts_parser_abort_limited_wasm", 0);
|
|
@@ -3341,9 +3137,7 @@ async function Module2(moduleArg = {}) {
|
|
|
3341
3137
|
Module["_ts_language_subtypes_wasm"] = _ts_language_subtypes_wasm = createExportWrapper("ts_language_subtypes_wasm", 2);
|
|
3342
3138
|
Module["_ts_tree_root_node_wasm"] = _ts_tree_root_node_wasm = createExportWrapper("ts_tree_root_node_wasm", 1);
|
|
3343
3139
|
Module["_ts_tree_root_node_with_offset_wasm"] = _ts_tree_root_node_with_offset_wasm = createExportWrapper("ts_tree_root_node_with_offset_wasm", 1);
|
|
3344
|
-
Module["_ts_tree_edit_wasm"] = _ts_tree_edit_wasm = createExportWrapper("ts_tree_edit_wasm", 1);
|
|
3345
3140
|
Module["_ts_tree_included_ranges_wasm"] = _ts_tree_included_ranges_wasm = createExportWrapper("ts_tree_included_ranges_wasm", 1);
|
|
3346
|
-
Module["_ts_tree_get_changed_ranges_wasm"] = _ts_tree_get_changed_ranges_wasm = createExportWrapper("ts_tree_get_changed_ranges_wasm", 2);
|
|
3347
3141
|
Module["_ts_tree_cursor_new_wasm"] = _ts_tree_cursor_new_wasm = createExportWrapper("ts_tree_cursor_new_wasm", 1);
|
|
3348
3142
|
Module["_ts_tree_cursor_copy_wasm"] = _ts_tree_cursor_copy_wasm = createExportWrapper("ts_tree_cursor_copy_wasm", 1);
|
|
3349
3143
|
Module["_ts_tree_cursor_delete_wasm"] = _ts_tree_cursor_delete_wasm = createExportWrapper("ts_tree_cursor_delete_wasm", 1);
|
|
@@ -3352,7 +3146,7 @@ async function Module2(moduleArg = {}) {
|
|
|
3352
3146
|
Module["_ts_tree_cursor_goto_first_child_wasm"] = _ts_tree_cursor_goto_first_child_wasm = createExportWrapper("ts_tree_cursor_goto_first_child_wasm", 1);
|
|
3353
3147
|
Module["_ts_tree_cursor_goto_last_child_wasm"] = _ts_tree_cursor_goto_last_child_wasm = createExportWrapper("ts_tree_cursor_goto_last_child_wasm", 1);
|
|
3354
3148
|
Module["_ts_tree_cursor_goto_first_child_for_index_wasm"] = _ts_tree_cursor_goto_first_child_for_index_wasm = createExportWrapper("ts_tree_cursor_goto_first_child_for_index_wasm", 2);
|
|
3355
|
-
Module["_ts_tree_cursor_goto_first_child_for_position_wasm"] = _ts_tree_cursor_goto_first_child_for_position_wasm = createExportWrapper("ts_tree_cursor_goto_first_child_for_position_wasm",
|
|
3149
|
+
Module["_ts_tree_cursor_goto_first_child_for_position_wasm"] = _ts_tree_cursor_goto_first_child_for_position_wasm = createExportWrapper("ts_tree_cursor_goto_first_child_for_position_wasm", 3);
|
|
3356
3150
|
Module["_ts_tree_cursor_goto_next_sibling_wasm"] = _ts_tree_cursor_goto_next_sibling_wasm = createExportWrapper("ts_tree_cursor_goto_next_sibling_wasm", 1);
|
|
3357
3151
|
Module["_ts_tree_cursor_goto_previous_sibling_wasm"] = _ts_tree_cursor_goto_previous_sibling_wasm = createExportWrapper("ts_tree_cursor_goto_previous_sibling_wasm", 1);
|
|
3358
3152
|
Module["_ts_tree_cursor_goto_descendant_wasm"] = _ts_tree_cursor_goto_descendant_wasm = createExportWrapper("ts_tree_cursor_goto_descendant_wasm", 2);
|
|
@@ -3361,10 +3155,6 @@ async function Module2(moduleArg = {}) {
|
|
|
3361
3155
|
Module["_ts_tree_cursor_current_node_id_wasm"] = _ts_tree_cursor_current_node_id_wasm = createExportWrapper("ts_tree_cursor_current_node_id_wasm", 1);
|
|
3362
3156
|
Module["_ts_tree_cursor_start_position_wasm"] = _ts_tree_cursor_start_position_wasm = createExportWrapper("ts_tree_cursor_start_position_wasm", 1);
|
|
3363
3157
|
Module["_ts_tree_cursor_end_position_wasm"] = _ts_tree_cursor_end_position_wasm = createExportWrapper("ts_tree_cursor_end_position_wasm", 1);
|
|
3364
|
-
Module["_ts_tree_cursor_start_index_wasm"] = _ts_tree_cursor_start_index_wasm = createExportWrapper("ts_tree_cursor_start_index_wasm", 1);
|
|
3365
|
-
Module["_ts_tree_cursor_end_index_wasm"] = _ts_tree_cursor_end_index_wasm = createExportWrapper("ts_tree_cursor_end_index_wasm", 1);
|
|
3366
|
-
Module["_ts_tree_cursor_current_depth_wasm"] = _ts_tree_cursor_current_depth_wasm = createExportWrapper("ts_tree_cursor_current_depth_wasm", 1);
|
|
3367
|
-
Module["_ts_tree_cursor_current_descendant_index_wasm"] = _ts_tree_cursor_current_descendant_index_wasm = createExportWrapper("ts_tree_cursor_current_descendant_index_wasm", 1);
|
|
3368
3158
|
Module["_ts_tree_cursor_current_node_wasm"] = _ts_tree_cursor_current_node_wasm = createExportWrapper("ts_tree_cursor_current_node_wasm", 1);
|
|
3369
3159
|
Module["_ts_node_symbol_wasm"] = _ts_node_symbol_wasm = createExportWrapper("ts_node_symbol_wasm", 1);
|
|
3370
3160
|
Module["_ts_node_field_name_for_child_wasm"] = _ts_node_field_name_for_child_wasm = createExportWrapper("ts_node_field_name_for_child_wasm", 2);
|
|
@@ -3389,25 +3179,22 @@ async function Module2(moduleArg = {}) {
|
|
|
3389
3179
|
Module["_ts_node_named_descendant_for_index_wasm"] = _ts_node_named_descendant_for_index_wasm = createExportWrapper("ts_node_named_descendant_for_index_wasm", 1);
|
|
3390
3180
|
Module["_ts_node_descendant_for_position_wasm"] = _ts_node_descendant_for_position_wasm = createExportWrapper("ts_node_descendant_for_position_wasm", 1);
|
|
3391
3181
|
Module["_ts_node_named_descendant_for_position_wasm"] = _ts_node_named_descendant_for_position_wasm = createExportWrapper("ts_node_named_descendant_for_position_wasm", 1);
|
|
3392
|
-
Module["_ts_node_start_point_wasm"] = _ts_node_start_point_wasm = createExportWrapper("ts_node_start_point_wasm", 1);
|
|
3393
3182
|
Module["_ts_node_end_point_wasm"] = _ts_node_end_point_wasm = createExportWrapper("ts_node_end_point_wasm", 1);
|
|
3394
|
-
Module["_ts_node_start_index_wasm"] = _ts_node_start_index_wasm = createExportWrapper("ts_node_start_index_wasm", 1);
|
|
3395
3183
|
Module["_ts_node_end_index_wasm"] = _ts_node_end_index_wasm = createExportWrapper("ts_node_end_index_wasm", 1);
|
|
3396
3184
|
Module["_ts_node_to_string_wasm"] = _ts_node_to_string_wasm = createExportWrapper("ts_node_to_string_wasm", 1);
|
|
3397
3185
|
Module["_ts_node_children_wasm"] = _ts_node_children_wasm = createExportWrapper("ts_node_children_wasm", 1);
|
|
3398
3186
|
Module["_ts_node_named_children_wasm"] = _ts_node_named_children_wasm = createExportWrapper("ts_node_named_children_wasm", 1);
|
|
3399
|
-
Module["_ts_node_descendants_of_type_wasm"] = _ts_node_descendants_of_type_wasm = createExportWrapper("ts_node_descendants_of_type_wasm",
|
|
3187
|
+
Module["_ts_node_descendants_of_type_wasm"] = _ts_node_descendants_of_type_wasm = createExportWrapper("ts_node_descendants_of_type_wasm", 3);
|
|
3400
3188
|
Module["_ts_node_is_named_wasm"] = _ts_node_is_named_wasm = createExportWrapper("ts_node_is_named_wasm", 1);
|
|
3401
|
-
Module["_ts_node_has_changes_wasm"] = _ts_node_has_changes_wasm = createExportWrapper("ts_node_has_changes_wasm", 1);
|
|
3402
3189
|
Module["_ts_node_has_error_wasm"] = _ts_node_has_error_wasm = createExportWrapper("ts_node_has_error_wasm", 1);
|
|
3403
3190
|
Module["_ts_node_is_error_wasm"] = _ts_node_is_error_wasm = createExportWrapper("ts_node_is_error_wasm", 1);
|
|
3404
3191
|
Module["_ts_node_is_missing_wasm"] = _ts_node_is_missing_wasm = createExportWrapper("ts_node_is_missing_wasm", 1);
|
|
3405
3192
|
Module["_ts_node_is_extra_wasm"] = _ts_node_is_extra_wasm = createExportWrapper("ts_node_is_extra_wasm", 1);
|
|
3406
3193
|
Module["_ts_node_parse_state_wasm"] = _ts_node_parse_state_wasm = createExportWrapper("ts_node_parse_state_wasm", 1);
|
|
3407
3194
|
Module["_ts_node_next_parse_state_wasm"] = _ts_node_next_parse_state_wasm = createExportWrapper("ts_node_next_parse_state_wasm", 1);
|
|
3408
|
-
Module["_memset"] = _memset = createExportWrapper("memset", 3);
|
|
3409
3195
|
Module["_memcpy"] = _memcpy = createExportWrapper("memcpy", 3);
|
|
3410
3196
|
Module["_memmove"] = _memmove = createExportWrapper("memmove", 3);
|
|
3197
|
+
Module["_memset"] = _memset = createExportWrapper("memset", 3);
|
|
3411
3198
|
_fflush = createExportWrapper("fflush", 1);
|
|
3412
3199
|
Module["_strlen"] = _strlen = createExportWrapper("strlen", 1);
|
|
3413
3200
|
Module["_iswalnum"] = _iswalnum = createExportWrapper("iswalnum", 1);
|
|
@@ -3454,8 +3241,6 @@ async function Module2(moduleArg = {}) {
|
|
|
3454
3241
|
/** @export */
|
|
3455
3242
|
__table_base: ___table_base,
|
|
3456
3243
|
/** @export */
|
|
3457
|
-
_abort_js: __abort_js,
|
|
3458
|
-
/** @export */
|
|
3459
3244
|
_emscripten_throw_longjmp: __emscripten_throw_longjmp,
|
|
3460
3245
|
/** @export */
|
|
3461
3246
|
alignfault,
|
|
@@ -3468,18 +3253,16 @@ async function Module2(moduleArg = {}) {
|
|
|
3468
3253
|
/** @export */
|
|
3469
3254
|
fd_write: _fd_write,
|
|
3470
3255
|
/** @export */
|
|
3256
|
+
invoke_ii,
|
|
3257
|
+
/** @export */
|
|
3471
3258
|
invoke_iii,
|
|
3472
3259
|
/** @export */
|
|
3473
3260
|
invoke_iiii,
|
|
3474
3261
|
/** @export */
|
|
3475
|
-
invoke_iiiii,
|
|
3476
|
-
/** @export */
|
|
3477
3262
|
invoke_ji,
|
|
3478
3263
|
/** @export */
|
|
3479
3264
|
invoke_vi,
|
|
3480
3265
|
/** @export */
|
|
3481
|
-
invoke_vii,
|
|
3482
|
-
/** @export */
|
|
3483
3266
|
invoke_vj,
|
|
3484
3267
|
/** @export */
|
|
3485
3268
|
memory: wasmMemory,
|
|
@@ -3492,28 +3275,28 @@ async function Module2(moduleArg = {}) {
|
|
|
3492
3275
|
/** @export */
|
|
3493
3276
|
tree_sitter_progress_callback: _tree_sitter_progress_callback
|
|
3494
3277
|
};
|
|
3495
|
-
function
|
|
3278
|
+
function invoke_vi(index, a1) {
|
|
3496
3279
|
var sp = stackSave();
|
|
3497
3280
|
try {
|
|
3498
|
-
getWasmTableEntry(index)(a1
|
|
3281
|
+
getWasmTableEntry(index)(a1);
|
|
3499
3282
|
} catch (e) {
|
|
3500
3283
|
stackRestore(sp);
|
|
3501
3284
|
if (e !== e + 0) throw e;
|
|
3502
3285
|
_setThrew(1, 0);
|
|
3503
3286
|
}
|
|
3504
3287
|
}
|
|
3505
|
-
__name(
|
|
3506
|
-
function
|
|
3288
|
+
__name(invoke_vi, "invoke_vi");
|
|
3289
|
+
function invoke_ii(index, a1) {
|
|
3507
3290
|
var sp = stackSave();
|
|
3508
3291
|
try {
|
|
3509
|
-
return getWasmTableEntry(index)(a1
|
|
3292
|
+
return getWasmTableEntry(index)(a1);
|
|
3510
3293
|
} catch (e) {
|
|
3511
3294
|
stackRestore(sp);
|
|
3512
3295
|
if (e !== e + 0) throw e;
|
|
3513
3296
|
_setThrew(1, 0);
|
|
3514
3297
|
}
|
|
3515
3298
|
}
|
|
3516
|
-
__name(
|
|
3299
|
+
__name(invoke_ii, "invoke_ii");
|
|
3517
3300
|
function invoke_vj(index, a1) {
|
|
3518
3301
|
var sp = stackSave();
|
|
3519
3302
|
try {
|
|
@@ -3537,17 +3320,6 @@ async function Module2(moduleArg = {}) {
|
|
|
3537
3320
|
}
|
|
3538
3321
|
}
|
|
3539
3322
|
__name(invoke_ji, "invoke_ji");
|
|
3540
|
-
function invoke_iiiii(index, a1, a2, a3, a4) {
|
|
3541
|
-
var sp = stackSave();
|
|
3542
|
-
try {
|
|
3543
|
-
return getWasmTableEntry(index)(a1, a2, a3, a4);
|
|
3544
|
-
} catch (e) {
|
|
3545
|
-
stackRestore(sp);
|
|
3546
|
-
if (e !== e + 0) throw e;
|
|
3547
|
-
_setThrew(1, 0);
|
|
3548
|
-
}
|
|
3549
|
-
}
|
|
3550
|
-
__name(invoke_iiiii, "invoke_iiiii");
|
|
3551
3323
|
function invoke_iiii(index, a1, a2, a3) {
|
|
3552
3324
|
var sp = stackSave();
|
|
3553
3325
|
try {
|
|
@@ -3559,17 +3331,17 @@ async function Module2(moduleArg = {}) {
|
|
|
3559
3331
|
}
|
|
3560
3332
|
}
|
|
3561
3333
|
__name(invoke_iiii, "invoke_iiii");
|
|
3562
|
-
function
|
|
3334
|
+
function invoke_iii(index, a1, a2) {
|
|
3563
3335
|
var sp = stackSave();
|
|
3564
3336
|
try {
|
|
3565
|
-
getWasmTableEntry(index)(a1);
|
|
3337
|
+
return getWasmTableEntry(index)(a1, a2);
|
|
3566
3338
|
} catch (e) {
|
|
3567
3339
|
stackRestore(sp);
|
|
3568
3340
|
if (e !== e + 0) throw e;
|
|
3569
3341
|
_setThrew(1, 0);
|
|
3570
3342
|
}
|
|
3571
3343
|
}
|
|
3572
|
-
__name(
|
|
3344
|
+
__name(invoke_iii, "invoke_iii");
|
|
3573
3345
|
var calledRun;
|
|
3574
3346
|
function callMain(args2 = []) {
|
|
3575
3347
|
assert(runDependencies == 0, 'cannot call main when async dependencies remain! (listen on Module["onRuntimeInitialized"])');
|
|
@@ -3599,7 +3371,7 @@ async function Module2(moduleArg = {}) {
|
|
|
3599
3371
|
}
|
|
3600
3372
|
__name(callMain, "callMain");
|
|
3601
3373
|
function stackCheckInit() {
|
|
3602
|
-
_emscripten_stack_set_limits(
|
|
3374
|
+
_emscripten_stack_set_limits(81952, 16416);
|
|
3603
3375
|
writeStackCookie();
|
|
3604
3376
|
}
|
|
3605
3377
|
__name(stackCheckInit, "stackCheckInit");
|
|
@@ -3738,6 +3510,8 @@ var Parser = class {
|
|
|
3738
3510
|
// Internal handle for Wasm
|
|
3739
3511
|
/** @internal */
|
|
3740
3512
|
logCallback = null;
|
|
3513
|
+
/** @internal */
|
|
3514
|
+
loggerEnabled = false;
|
|
3741
3515
|
/** The parser's current language. */
|
|
3742
3516
|
language = null;
|
|
3743
3517
|
/** The number of parse operations executed by the most recent {@link Parser#parse} call. */
|
|
@@ -3772,6 +3546,7 @@ var Parser = class {
|
|
|
3772
3546
|
const base = TRANSFER_BUFFER >>> 2;
|
|
3773
3547
|
this[0] = C.HEAP32[base];
|
|
3774
3548
|
this[1] = C.HEAP32[base + 1];
|
|
3549
|
+
this.loggerEnabled = false;
|
|
3775
3550
|
}
|
|
3776
3551
|
/** Delete the parser, freeing its resources. */
|
|
3777
3552
|
delete() {
|
|
@@ -3810,10 +3585,6 @@ var Parser = class {
|
|
|
3810
3585
|
*
|
|
3811
3586
|
* @param {string | ParseCallback} callback - The UTF8-encoded text to parse or a callback function.
|
|
3812
3587
|
*
|
|
3813
|
-
* @param {Tree | null} [oldTree] - A previous syntax tree parsed from the same document. If the text of the
|
|
3814
|
-
* document has changed since `oldTree` was created, then you must edit `oldTree` to match
|
|
3815
|
-
* the new text using {@link Tree#edit}.
|
|
3816
|
-
*
|
|
3817
3588
|
* @param {ParseOptions} [options] - Options for parsing the text.
|
|
3818
3589
|
* This can be used to set the included ranges, or a progress callback.
|
|
3819
3590
|
*
|
|
@@ -3822,41 +3593,78 @@ var Parser = class {
|
|
|
3822
3593
|
* - The progress callback returned true.
|
|
3823
3594
|
* - The memory limit was reached or the operation limit was exceeded.
|
|
3824
3595
|
*/
|
|
3825
|
-
parse(callback,
|
|
3596
|
+
parse(callback, options) {
|
|
3826
3597
|
const maxMemoryBytes = validateMemoryLimit(options?.maxMemoryBytes);
|
|
3827
3598
|
const maxOperations = validateOperationLimit(options?.maxOperations);
|
|
3828
|
-
|
|
3829
|
-
|
|
3830
|
-
C.currentProgressCallback = options?.progressCallback ?? null;
|
|
3831
|
-
if (this.logCallback) {
|
|
3832
|
-
C.currentLogCallback = this.logCallback;
|
|
3833
|
-
C._ts_parser_enable_logger_wasm(this[0], 1);
|
|
3834
|
-
} else {
|
|
3835
|
-
C.currentLogCallback = null;
|
|
3836
|
-
C._ts_parser_enable_logger_wasm(this[0], 0);
|
|
3599
|
+
if (typeof callback !== "string" && typeof callback !== "function") {
|
|
3600
|
+
throw new Error("Argument must be a string or a function");
|
|
3837
3601
|
}
|
|
3602
|
+
const progressCallback = options?.progressCallback ?? null;
|
|
3603
|
+
C.currentParseCallback = callback;
|
|
3604
|
+
C.currentProgressCallback = progressCallback;
|
|
3605
|
+
this.syncLogger();
|
|
3838
3606
|
this.lastParseOperations = 0;
|
|
3839
|
-
const request = {
|
|
3840
|
-
parserAddress: this[0],
|
|
3841
|
-
callbackBuffer: this[1],
|
|
3842
|
-
sourceText,
|
|
3843
|
-
oldTreeAddress: oldTree ? oldTree[0] : 0,
|
|
3844
|
-
ranges: options?.includedRanges,
|
|
3845
|
-
maxOperations,
|
|
3846
|
-
hasProgressCallback: options?.progressCallback ? 1 : 0,
|
|
3847
|
-
onOperations: /* @__PURE__ */ __name((operations) => {
|
|
3848
|
-
this.lastParseOperations = operations;
|
|
3849
|
-
}, "onOperations")
|
|
3850
|
-
};
|
|
3851
3607
|
try {
|
|
3852
|
-
const treeAddress =
|
|
3608
|
+
const treeAddress = this.runParse(options, maxMemoryBytes, maxOperations);
|
|
3853
3609
|
if (!treeAddress) return null;
|
|
3854
3610
|
if (!this.language) throw new Error("Parser must have a language to parse");
|
|
3855
|
-
return new Tree2(INTERNAL, treeAddress, this.language,
|
|
3611
|
+
return new Tree2(INTERNAL, treeAddress, this.language, callback);
|
|
3856
3612
|
} finally {
|
|
3857
3613
|
clearCallbacks();
|
|
3858
3614
|
}
|
|
3859
3615
|
}
|
|
3616
|
+
/** @internal */
|
|
3617
|
+
syncLogger() {
|
|
3618
|
+
if (this.logCallback) {
|
|
3619
|
+
C.currentLogCallback = this.logCallback;
|
|
3620
|
+
if (!this.loggerEnabled) {
|
|
3621
|
+
C._ts_parser_enable_logger_wasm(this[0], 1);
|
|
3622
|
+
this.loggerEnabled = true;
|
|
3623
|
+
}
|
|
3624
|
+
} else {
|
|
3625
|
+
C.currentLogCallback = null;
|
|
3626
|
+
if (this.loggerEnabled) {
|
|
3627
|
+
C._ts_parser_enable_logger_wasm(this[0], 0);
|
|
3628
|
+
this.loggerEnabled = false;
|
|
3629
|
+
}
|
|
3630
|
+
}
|
|
3631
|
+
}
|
|
3632
|
+
/** @internal */
|
|
3633
|
+
runParse(options, maxMemoryBytes, maxOperations) {
|
|
3634
|
+
if (maxMemoryBytes !== void 0 && !C.treeSitterSetMemoryLimit(maxMemoryBytes)) {
|
|
3635
|
+
return 0;
|
|
3636
|
+
}
|
|
3637
|
+
try {
|
|
3638
|
+
const [rangeAddress, rangeCount] = prepareRanges(options?.includedRanges);
|
|
3639
|
+
if (rangeCount && !rangeAddress) return 0;
|
|
3640
|
+
marshalParseInputs(maxOperations, rangeAddress, rangeCount, options?.progressCallback ? 1 : 0);
|
|
3641
|
+
try {
|
|
3642
|
+
return maxMemoryBytes === void 0 ? this.executeOrdinaryParse() : this.executeLimitedParse();
|
|
3643
|
+
} finally {
|
|
3644
|
+
this.lastParseOperations = unmarshalOperationCount();
|
|
3645
|
+
}
|
|
3646
|
+
} finally {
|
|
3647
|
+
if (maxMemoryBytes !== void 0) C.treeSitterSetMemoryLimit(0);
|
|
3648
|
+
}
|
|
3649
|
+
}
|
|
3650
|
+
/** @internal */
|
|
3651
|
+
executeOrdinaryParse() {
|
|
3652
|
+
try {
|
|
3653
|
+
return C._ts_parser_parse_wasm(this[0], this[1]);
|
|
3654
|
+
} catch (error) {
|
|
3655
|
+
C._ts_parser_last_parse_operations_wasm(this[0]);
|
|
3656
|
+
throw error;
|
|
3657
|
+
}
|
|
3658
|
+
}
|
|
3659
|
+
/** @internal */
|
|
3660
|
+
executeLimitedParse() {
|
|
3661
|
+
try {
|
|
3662
|
+
return C._ts_parser_parse_limited_wasm(this[0], this[1]);
|
|
3663
|
+
} catch (error) {
|
|
3664
|
+
C._ts_parser_abort_limited_wasm();
|
|
3665
|
+
throw error;
|
|
3666
|
+
}
|
|
3667
|
+
}
|
|
3860
3668
|
/**
|
|
3861
3669
|
* Instruct the parser to start the next parse from the beginning.
|
|
3862
3670
|
*
|
|
@@ -3904,102 +3712,31 @@ function validateOperationLimit(maxOperations) {
|
|
|
3904
3712
|
return maxOperations;
|
|
3905
3713
|
}
|
|
3906
3714
|
__name(validateOperationLimit, "validateOperationLimit");
|
|
3907
|
-
function resolveInput(callback) {
|
|
3908
|
-
if (typeof callback === "string") {
|
|
3909
|
-
return { sourceText: callback, textCallback: /* @__PURE__ */ __name((index) => callback.slice(index), "textCallback") };
|
|
3910
|
-
}
|
|
3911
|
-
if (typeof callback === "function") {
|
|
3912
|
-
return { sourceText: void 0, textCallback: callback };
|
|
3913
|
-
}
|
|
3914
|
-
throw new Error("Argument must be a string or a function");
|
|
3915
|
-
}
|
|
3916
|
-
__name(resolveInput, "resolveInput");
|
|
3917
|
-
function parseOrdinaryWasm(request) {
|
|
3918
|
-
return withPreparedParse(request, (inputBuffer) => {
|
|
3919
|
-
try {
|
|
3920
|
-
return C._ts_parser_parse_wasm(request.parserAddress, inputBuffer, request.oldTreeAddress);
|
|
3921
|
-
} catch (error) {
|
|
3922
|
-
C._ts_parser_last_parse_operations_wasm(request.parserAddress);
|
|
3923
|
-
throw error;
|
|
3924
|
-
}
|
|
3925
|
-
});
|
|
3926
|
-
}
|
|
3927
|
-
__name(parseOrdinaryWasm, "parseOrdinaryWasm");
|
|
3928
|
-
function parseLimitedWasm(request, maxMemoryBytes) {
|
|
3929
|
-
if (!C.treeSitterSetMemoryLimit(maxMemoryBytes)) return 0;
|
|
3930
|
-
try {
|
|
3931
|
-
return withPreparedParse(request, (inputBuffer) => {
|
|
3932
|
-
try {
|
|
3933
|
-
return C._ts_parser_parse_limited_wasm(request.parserAddress, inputBuffer);
|
|
3934
|
-
} catch (error) {
|
|
3935
|
-
C._ts_parser_abort_limited_wasm();
|
|
3936
|
-
throw error;
|
|
3937
|
-
}
|
|
3938
|
-
});
|
|
3939
|
-
} finally {
|
|
3940
|
-
C.treeSitterSetMemoryLimit(0);
|
|
3941
|
-
}
|
|
3942
|
-
}
|
|
3943
|
-
__name(parseLimitedWasm, "parseLimitedWasm");
|
|
3944
|
-
function withPreparedParse(request, execute) {
|
|
3945
|
-
let sourceAddress = 0;
|
|
3946
|
-
let rangeAddress = 0;
|
|
3947
|
-
let executed = false;
|
|
3948
|
-
try {
|
|
3949
|
-
const [allocatedSource, byteLength, ok] = prepareSourceBuffer(request.sourceText);
|
|
3950
|
-
sourceAddress = allocatedSource;
|
|
3951
|
-
if (!ok) return 0;
|
|
3952
|
-
const [allocatedRanges, rangeCount] = prepareRanges(request.ranges);
|
|
3953
|
-
rangeAddress = allocatedRanges;
|
|
3954
|
-
if (rangeCount && !allocatedRanges) return 0;
|
|
3955
|
-
const isStringInput = request.sourceText !== void 0;
|
|
3956
|
-
marshalParseInputs(request.maxOperations, byteLength, allocatedRanges, rangeCount, isStringInput, request.hasProgressCallback);
|
|
3957
|
-
executed = true;
|
|
3958
|
-
return execute(isStringInput ? allocatedSource : request.callbackBuffer);
|
|
3959
|
-
} finally {
|
|
3960
|
-
if (executed) request.onOperations(unmarshalOperationCount());
|
|
3961
|
-
if (rangeAddress) C._free(rangeAddress);
|
|
3962
|
-
if (sourceAddress) C._free(sourceAddress);
|
|
3963
|
-
}
|
|
3964
|
-
}
|
|
3965
|
-
__name(withPreparedParse, "withPreparedParse");
|
|
3966
|
-
function prepareSourceBuffer(sourceText) {
|
|
3967
|
-
if (sourceText === void 0) return [0, 0, true];
|
|
3968
|
-
const codeUnits = sourceText.length;
|
|
3969
|
-
if (codeUnits === 0) return [0, 0, true];
|
|
3970
|
-
if (codeUnits > 1073741823) return [0, 0, false];
|
|
3971
|
-
const byteLength = codeUnits * 2;
|
|
3972
|
-
const address = C._malloc(byteLength);
|
|
3973
|
-
if (!address) return [0, 0, false];
|
|
3974
|
-
const heapU16 = C.HEAPU16;
|
|
3975
|
-
const base = address >>> 1;
|
|
3976
|
-
for (let i2 = 0; i2 < codeUnits; i2++) {
|
|
3977
|
-
heapU16[base + i2] = sourceText.charCodeAt(i2);
|
|
3978
|
-
}
|
|
3979
|
-
return [address, byteLength, true];
|
|
3980
|
-
}
|
|
3981
|
-
__name(prepareSourceBuffer, "prepareSourceBuffer");
|
|
3982
3715
|
function prepareRanges(ranges) {
|
|
3983
3716
|
if (!ranges?.length) return [0, 0];
|
|
3984
3717
|
const rangeAddress = C._calloc(ranges.length, SIZE_OF_RANGE);
|
|
3985
3718
|
if (!rangeAddress) return [0, ranges.length];
|
|
3986
|
-
|
|
3987
|
-
|
|
3988
|
-
|
|
3989
|
-
|
|
3719
|
+
try {
|
|
3720
|
+
let address = rangeAddress;
|
|
3721
|
+
for (const range of ranges) {
|
|
3722
|
+
marshalRange(address, range);
|
|
3723
|
+
address += SIZE_OF_RANGE;
|
|
3724
|
+
}
|
|
3725
|
+
return [rangeAddress, ranges.length];
|
|
3726
|
+
} catch (error) {
|
|
3727
|
+
C._free(rangeAddress);
|
|
3728
|
+
throw error;
|
|
3990
3729
|
}
|
|
3991
|
-
return [rangeAddress, ranges.length];
|
|
3992
3730
|
}
|
|
3993
3731
|
__name(prepareRanges, "prepareRanges");
|
|
3994
|
-
function marshalParseInputs(maxOperations,
|
|
3732
|
+
function marshalParseInputs(maxOperations, rangeAddress, rangeCount, hasProgressCallback) {
|
|
3995
3733
|
const base = TRANSFER_BUFFER >>> 2;
|
|
3996
3734
|
const heapU32 = C.HEAPU32;
|
|
3997
3735
|
heapU32[base] = maxOperations === void 0 ? 0 : maxOperations >>> 0;
|
|
3998
3736
|
heapU32[base + 1] = maxOperations === void 0 ? 0 : Math.floor(maxOperations / TWO_POW_32) >>> 0;
|
|
3999
|
-
heapU32[base + 2] =
|
|
4000
|
-
heapU32[base + 3] =
|
|
4001
|
-
heapU32[base + 4] =
|
|
4002
|
-
heapU32[base + 5] = (isStringInput ? 1 : 0) | (hasProgressCallback ? 2 : 0);
|
|
3737
|
+
heapU32[base + 2] = rangeAddress;
|
|
3738
|
+
heapU32[base + 3] = rangeCount;
|
|
3739
|
+
heapU32[base + 4] = hasProgressCallback;
|
|
4003
3740
|
}
|
|
4004
3741
|
__name(marshalParseInputs, "marshalParseInputs");
|
|
4005
3742
|
function unmarshalOperationCount() {
|
|
@@ -4015,7 +3752,6 @@ function clearCallbacks() {
|
|
|
4015
3752
|
}
|
|
4016
3753
|
__name(clearCallbacks, "clearCallbacks");
|
|
4017
3754
|
export {
|
|
4018
|
-
Edit,
|
|
4019
3755
|
LANGUAGE_VERSION,
|
|
4020
3756
|
Language,
|
|
4021
3757
|
LookaheadIterator,
|