parseman 0.43.0 → 0.44.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/dist/combinators/attempt.d.ts.map +1 -1
- package/dist/combinators/choice.d.ts.map +1 -1
- package/dist/combinators/grammar.d.ts +7 -0
- package/dist/combinators/grammar.d.ts.map +1 -1
- package/dist/combinators/map.d.ts +11 -0
- package/dist/combinators/map.d.ts.map +1 -1
- package/dist/combinators/token.d.ts +3 -2
- package/dist/combinators/token.d.ts.map +1 -1
- package/dist/combinators/trivia-skip.d.ts +1 -0
- package/dist/combinators/trivia-skip.d.ts.map +1 -1
- package/dist/compiler/codegen.d.ts.map +1 -1
- package/dist/compiler/ir-serialize.d.ts.map +1 -1
- package/dist/compiler/scannable-run.d.ts +1 -1
- package/dist/compiler/scannable-run.d.ts.map +1 -1
- package/dist/compiler/trivia-fast-path.d.ts +4 -3
- package/dist/compiler/trivia-fast-path.d.ts.map +1 -1
- package/dist/cst/trivia-entries.d.ts +15 -9
- package/dist/cst/trivia-entries.d.ts.map +1 -1
- package/dist/cst/trivia-kinds.d.ts +15 -11
- package/dist/cst/trivia-kinds.d.ts.map +1 -1
- package/dist/functional/run.d.ts +22 -16
- package/dist/functional/run.d.ts.map +1 -1
- package/dist/index.cjs +1416 -1115
- package/dist/index.cjs.map +4 -4
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1416 -1115
- package/dist/index.js.map +4 -4
- package/dist/language-service/index.cjs +161 -102
- package/dist/language-service/index.cjs.map +3 -3
- package/dist/language-service/index.js +161 -102
- package/dist/language-service/index.js.map +3 -3
- package/dist/plugin/evaluator.d.ts.map +1 -1
- package/dist/plugin/index.cjs +1217 -985
- package/dist/plugin/index.cjs.map +4 -4
- package/dist/plugin/index.d.ts.map +1 -1
- package/dist/plugin/index.js +1217 -985
- package/dist/plugin/index.js.map +4 -4
- package/dist/run/index.cjs +152 -102
- package/dist/run/index.cjs.map +3 -3
- package/dist/run/index.d.ts +1 -1
- package/dist/run/index.d.ts.map +1 -1
- package/dist/run/index.js +152 -102
- package/dist/run/index.js.map +3 -3
- package/dist/spec/index.cjs +1414 -1286
- package/dist/spec/index.cjs.map +4 -4
- package/dist/spec/index.js +1414 -1286
- package/dist/spec/index.js.map +4 -4
- package/dist/types.d.ts +25 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -102,6 +102,7 @@ function probeAt(sentinel, input, pos, ctx) {
|
|
|
102
102
|
_cstRawChildren: ctx._cstRawChildren,
|
|
103
103
|
_cstTriviaLog: ctx._cstTriviaLog,
|
|
104
104
|
_triviaLog: ctx._triviaLog,
|
|
105
|
+
_rootTriviaLog: ctx._rootTriviaLog,
|
|
105
106
|
_fields: ctx._fields,
|
|
106
107
|
_cstBuf: ctx._cstBuf,
|
|
107
108
|
_tolerant: ctx._tolerant,
|
|
@@ -114,6 +115,7 @@ function probeAt(sentinel, input, pos, ctx) {
|
|
|
114
115
|
ctx._cstRawChildren = void 0;
|
|
115
116
|
ctx._cstTriviaLog = void 0;
|
|
116
117
|
ctx._triviaLog = void 0;
|
|
118
|
+
ctx._rootTriviaLog = void 0;
|
|
117
119
|
ctx._fields = void 0;
|
|
118
120
|
ctx._cstBuf = void 0;
|
|
119
121
|
ctx._tolerant = void 0;
|
|
@@ -128,6 +130,7 @@ function probeAt(sentinel, input, pos, ctx) {
|
|
|
128
130
|
ctx._cstRawChildren = s._cstRawChildren;
|
|
129
131
|
ctx._cstTriviaLog = s._cstTriviaLog;
|
|
130
132
|
ctx._triviaLog = s._triviaLog;
|
|
133
|
+
ctx._rootTriviaLog = s._rootTriviaLog;
|
|
131
134
|
ctx._fields = s._fields;
|
|
132
135
|
ctx._cstBuf = s._cstBuf;
|
|
133
136
|
ctx._tolerant = s._tolerant;
|
|
@@ -185,105 +188,97 @@ var REC = { scan: recoverScan, at: matchesAt, or: orSentinel, sentinel: firstSet
|
|
|
185
188
|
// src/cst/trivia-entries.ts
|
|
186
189
|
var EMPTY_INDICES = Object.freeze([]);
|
|
187
190
|
var EMPTY_GAPS = Object.freeze([]);
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
const
|
|
193
|
-
const
|
|
194
|
-
const
|
|
195
|
-
|
|
191
|
+
var SELECTED_ROOT_STRIDE = 5;
|
|
192
|
+
function buildRootTriviaIndex(log, labels) {
|
|
193
|
+
const length = Math.floor(log.length / SELECTED_ROOT_STRIDE);
|
|
194
|
+
const markerOffset = (i) => i * SELECTED_ROOT_STRIDE;
|
|
195
|
+
const ownedRangeStart = (i) => log[markerOffset(i)];
|
|
196
|
+
const ownedRangeEnd = (i) => log[markerOffset(i) + 1];
|
|
197
|
+
const markerStart = (i) => log[markerOffset(i) + 2];
|
|
198
|
+
const markerEnd = (i) => log[markerOffset(i) + 3];
|
|
199
|
+
const markerKind = (i) => log[markerOffset(i) + 4];
|
|
200
|
+
const entries = {
|
|
196
201
|
length,
|
|
197
202
|
labels,
|
|
198
|
-
stride,
|
|
199
|
-
start
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
return log[entryOffset(i, stride) + 1];
|
|
204
|
-
},
|
|
205
|
-
insertIndex(i) {
|
|
206
|
-
return opts?.nodeLog ? log[entryOffset(i, stride) + 2] : void 0;
|
|
207
|
-
},
|
|
208
|
-
kindIndex(i) {
|
|
209
|
-
if (!labels) return void 0;
|
|
210
|
-
return log[entryOffset(i, stride) + baseStride];
|
|
211
|
-
},
|
|
203
|
+
stride: SELECTED_ROOT_STRIDE,
|
|
204
|
+
start: markerStart,
|
|
205
|
+
end: markerEnd,
|
|
206
|
+
insertIndex: () => void 0,
|
|
207
|
+
kindIndex: markerKind,
|
|
212
208
|
kind(i) {
|
|
213
|
-
|
|
214
|
-
return ki !== void 0 ? labels[ki] : void 0;
|
|
209
|
+
return labels[markerKind(i)];
|
|
215
210
|
},
|
|
216
211
|
text(i, input) {
|
|
217
|
-
|
|
218
|
-
const e = log[entryOffset(i, stride) + 1];
|
|
219
|
-
return input.slice(s, e);
|
|
212
|
+
return input.slice(markerStart(i), markerEnd(i));
|
|
220
213
|
}
|
|
221
214
|
};
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
for (let i = first; i <= last; i++) indices.push(i);
|
|
230
|
-
}
|
|
231
|
-
function buildGap(entries, start, end, first, last) {
|
|
232
|
-
const entryIndices = [];
|
|
233
|
-
for (let i = first; i <= last; i++) entryIndices.push(i);
|
|
234
|
-
return {
|
|
235
|
-
start,
|
|
236
|
-
end,
|
|
237
|
-
entryIndices,
|
|
238
|
-
hasKind(kind) {
|
|
239
|
-
for (const i of entryIndices) {
|
|
240
|
-
if (entries.kind(i) === kind) return true;
|
|
241
|
-
}
|
|
242
|
-
return false;
|
|
243
|
-
},
|
|
244
|
-
text(input) {
|
|
245
|
-
return input.slice(start, end);
|
|
215
|
+
const lowerBound = (offset, by) => {
|
|
216
|
+
let lo = 0;
|
|
217
|
+
let hi = length;
|
|
218
|
+
while (lo < hi) {
|
|
219
|
+
const mid = lo + hi >>> 1;
|
|
220
|
+
if (by(mid) < offset) lo = mid + 1;
|
|
221
|
+
else hi = mid;
|
|
246
222
|
}
|
|
223
|
+
return lo;
|
|
247
224
|
};
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
225
|
+
const gapRowsAt = (offset, direction) => {
|
|
226
|
+
const edge = direction === "before" ? ownedRangeEnd : ownedRangeStart;
|
|
227
|
+
let first = lowerBound(offset, edge);
|
|
228
|
+
if (first === length || edge(first) !== offset) return void 0;
|
|
229
|
+
const start = ownedRangeStart(first);
|
|
230
|
+
const end = ownedRangeEnd(first);
|
|
231
|
+
while (first > 0 && ownedRangeStart(first - 1) === start && ownedRangeEnd(first - 1) === end) first--;
|
|
232
|
+
let last = first + 1;
|
|
233
|
+
while (last < length && ownedRangeStart(last) === start && ownedRangeEnd(last) === end) last++;
|
|
234
|
+
return [first, last];
|
|
235
|
+
};
|
|
236
|
+
const indices = (first, last) => {
|
|
237
|
+
const out = [];
|
|
238
|
+
for (let i = first; i < last; i++) out.push(i);
|
|
239
|
+
return out;
|
|
240
|
+
};
|
|
241
|
+
const makeGap = (first, last) => {
|
|
242
|
+
const start = ownedRangeStart(first);
|
|
243
|
+
const end = ownedRangeEnd(first);
|
|
244
|
+
let entryIndices;
|
|
245
|
+
return {
|
|
246
|
+
start,
|
|
247
|
+
end,
|
|
248
|
+
get entryIndices() {
|
|
249
|
+
return entryIndices ??= indices(first, last);
|
|
250
|
+
},
|
|
251
|
+
hasKind(kind) {
|
|
252
|
+
for (let i = first; i < last; i++) {
|
|
253
|
+
if (labels[markerKind(i)] === kind) return true;
|
|
254
|
+
}
|
|
255
|
+
return false;
|
|
256
|
+
},
|
|
257
|
+
text(input) {
|
|
258
|
+
return input.slice(start, end);
|
|
259
|
+
}
|
|
260
|
+
};
|
|
263
261
|
};
|
|
264
|
-
let first = 0;
|
|
265
|
-
let start = entries.start(0);
|
|
266
|
-
let end = entries.end(0);
|
|
267
|
-
for (let i = 1; i < entries.length; i++) {
|
|
268
|
-
const nextStart = entries.start(i);
|
|
269
|
-
const nextEnd = entries.end(i);
|
|
270
|
-
if (nextStart === end) {
|
|
271
|
-
end = nextEnd;
|
|
272
|
-
continue;
|
|
273
|
-
}
|
|
274
|
-
appendGap(first, i - 1, start, end);
|
|
275
|
-
first = i;
|
|
276
|
-
start = nextStart;
|
|
277
|
-
end = nextEnd;
|
|
278
|
-
}
|
|
279
|
-
appendGap(first, entries.length - 1, start, end);
|
|
280
|
-
return { before, after, beforeGaps, afterGaps, gaps };
|
|
281
|
-
}
|
|
282
|
-
function buildRootTriviaIndex(log, labels) {
|
|
283
|
-
const entries = triviaEntries(log, labels);
|
|
284
262
|
let maps;
|
|
285
263
|
const getMaps = () => {
|
|
286
|
-
maps
|
|
264
|
+
if (maps !== void 0) return maps;
|
|
265
|
+
const before = /* @__PURE__ */ new Map();
|
|
266
|
+
const after = /* @__PURE__ */ new Map();
|
|
267
|
+
const beforeGaps = /* @__PURE__ */ new Map();
|
|
268
|
+
const afterGaps = /* @__PURE__ */ new Map();
|
|
269
|
+
const gaps = [];
|
|
270
|
+
for (let first = 0; first < length; ) {
|
|
271
|
+
let last = first + 1;
|
|
272
|
+
while (last < length && ownedRangeStart(last) === ownedRangeStart(first) && ownedRangeEnd(last) === ownedRangeEnd(first)) last++;
|
|
273
|
+
const gap = makeGap(first, last);
|
|
274
|
+
gaps.push(gap);
|
|
275
|
+
afterGaps.set(gap.start, gap);
|
|
276
|
+
beforeGaps.set(gap.end, gap);
|
|
277
|
+
after.set(gap.start, [...gap.entryIndices]);
|
|
278
|
+
before.set(gap.end, [...gap.entryIndices]);
|
|
279
|
+
first = last;
|
|
280
|
+
}
|
|
281
|
+
maps = { before, after, beforeGaps, afterGaps, gaps };
|
|
287
282
|
return maps;
|
|
288
283
|
};
|
|
289
284
|
return {
|
|
@@ -296,16 +291,20 @@ function buildRootTriviaIndex(log, labels) {
|
|
|
296
291
|
return getMaps().after;
|
|
297
292
|
},
|
|
298
293
|
entryIndicesBefore(offset) {
|
|
299
|
-
|
|
294
|
+
const rows = gapRowsAt(offset, "before");
|
|
295
|
+
return rows ? indices(rows[0], rows[1]) : EMPTY_INDICES;
|
|
300
296
|
},
|
|
301
297
|
entryIndicesAfter(offset) {
|
|
302
|
-
|
|
298
|
+
const rows = gapRowsAt(offset, "after");
|
|
299
|
+
return rows ? indices(rows[0], rows[1]) : EMPTY_INDICES;
|
|
303
300
|
},
|
|
304
301
|
gapBefore(offset) {
|
|
305
|
-
|
|
302
|
+
const rows = gapRowsAt(offset, "before");
|
|
303
|
+
return rows ? makeGap(rows[0], rows[1]) : void 0;
|
|
306
304
|
},
|
|
307
305
|
gapAfter(offset) {
|
|
308
|
-
|
|
306
|
+
const rows = gapRowsAt(offset, "after");
|
|
307
|
+
return rows ? makeGap(rows[0], rows[1]) : void 0;
|
|
309
308
|
},
|
|
310
309
|
gaps() {
|
|
311
310
|
return getMaps().gaps;
|
|
@@ -313,13 +312,21 @@ function buildRootTriviaIndex(log, labels) {
|
|
|
313
312
|
gapsWithKind(kind) {
|
|
314
313
|
const kinds = typeof kind === "string" ? [kind] : kind;
|
|
315
314
|
const matches2 = [];
|
|
316
|
-
for (
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
315
|
+
for (let first = 0; first < length; ) {
|
|
316
|
+
let last = first + 1;
|
|
317
|
+
while (last < length && ownedRangeStart(last) === ownedRangeStart(first) && ownedRangeEnd(last) === ownedRangeEnd(first)) last++;
|
|
318
|
+
let matched = false;
|
|
319
|
+
for (let i = first; i < last && !matched; i++) {
|
|
320
|
+
const label2 = labels[markerKind(i)];
|
|
321
|
+
for (const kind2 of kinds) {
|
|
322
|
+
if (label2 === kind2) {
|
|
323
|
+
matched = true;
|
|
324
|
+
break;
|
|
325
|
+
}
|
|
321
326
|
}
|
|
322
327
|
}
|
|
328
|
+
if (matched) matches2.push(makeGap(first, last));
|
|
329
|
+
first = last;
|
|
323
330
|
}
|
|
324
331
|
return matches2.length === 0 ? EMPTY_GAPS : matches2;
|
|
325
332
|
}
|
|
@@ -349,7 +356,20 @@ function triviaKindLabelsFromRunnable(r) {
|
|
|
349
356
|
if (!r) return void 0;
|
|
350
357
|
if (typeof r === "function") return r._meta?.triviaKindLabels;
|
|
351
358
|
const grammarTrivia = r._meta.grammarTrivia;
|
|
352
|
-
return
|
|
359
|
+
return grammarTrivia?._meta.triviaKindLabels ?? r._meta.triviaKindLabels ?? (r._def.tag === "grammar" ? r._def.triviaParser?._meta.triviaKindLabels : void 0);
|
|
360
|
+
}
|
|
361
|
+
function rootTriviaClassifiedFromRunnable(r) {
|
|
362
|
+
if (!r) return false;
|
|
363
|
+
if (typeof r === "function") return r._meta?.rootTriviaClassified === true;
|
|
364
|
+
const grammarTrivia = r._meta.grammarTrivia;
|
|
365
|
+
return grammarTrivia?._meta.rootTriviaClassified === true || r._meta.rootTriviaClassified === true;
|
|
366
|
+
}
|
|
367
|
+
function makeSelectedRootLabelIndex(labels) {
|
|
368
|
+
const index = /* @__PURE__ */ Object.create(null);
|
|
369
|
+
for (let i = 0; i < labels.length; i++) {
|
|
370
|
+
if (index[labels[i]] === void 0) index[labels[i]] = i;
|
|
371
|
+
}
|
|
372
|
+
return index;
|
|
353
373
|
}
|
|
354
374
|
function runOnce(entry, input, options, phase, profileState) {
|
|
355
375
|
if (typeof entry !== "function" && typeof entry?.parse !== "function") {
|
|
@@ -357,13 +377,31 @@ function runOnce(entry, input, options, phase, profileState) {
|
|
|
357
377
|
`run(): start production is ${entry === null ? "null" : typeof entry}, not a rule \u2014 the requested grammar rule does not exist (check the rule name).`
|
|
358
378
|
);
|
|
359
379
|
}
|
|
360
|
-
const
|
|
380
|
+
const rootTriviaSelection = options.rootTrivia?.select;
|
|
381
|
+
const captureRootTrivia = rootTriviaSelection !== void 0 && rootTriviaSelection.length > 0;
|
|
382
|
+
const selectedRootLog = captureRootTrivia ? [] : void 0;
|
|
383
|
+
const selectedRootLabelIndex = captureRootTrivia ? makeSelectedRootLabelIndex(rootTriviaSelection) : void 0;
|
|
361
384
|
const errors = [];
|
|
362
385
|
const profile = profileState ?? (phase === void 0 ? void 0 : { phase, nodes: 0, childSlots: 0, rawSlots: 0, triviaSlots: 0, fieldSlots: 0, hostCalls: 0 });
|
|
363
386
|
const skipGlobalSinks = phase === "recognizer" || phase === "capture";
|
|
364
387
|
const grammarTrivia = typeof entry !== "function" ? entry._meta.grammarTrivia : void 0;
|
|
365
388
|
const grammarScanSkip = typeof entry !== "function" ? entry._meta.grammarScanSkip : void 0;
|
|
366
389
|
const triviaKindLabels = triviaKindLabelsFromRunnable(entry) ?? triviaKindLabelsFromRunnable(options.trivia);
|
|
390
|
+
if (captureRootTrivia && triviaKindLabels === void 0) {
|
|
391
|
+
throw new TypeError("run(): rootTrivia.select requires labeled grammar trivia.");
|
|
392
|
+
}
|
|
393
|
+
if (captureRootTrivia) {
|
|
394
|
+
for (const label2 of rootTriviaSelection) {
|
|
395
|
+
if (!triviaKindLabels.includes(label2)) {
|
|
396
|
+
throw new TypeError(`run(): rootTrivia.select contains unknown trivia label ${JSON.stringify(label2)}.`);
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
if (captureRootTrivia && !rootTriviaClassifiedFromRunnable(entry) && !rootTriviaClassifiedFromRunnable(options.trivia)) {
|
|
401
|
+
throw new TypeError(
|
|
402
|
+
"run(): rootTrivia.select requires classifiedTrivia() at the root."
|
|
403
|
+
);
|
|
404
|
+
}
|
|
367
405
|
const stamped = entry;
|
|
368
406
|
assertHostModeCompatible(
|
|
369
407
|
typeof entry === "function" ? stamped[FUSED_HOST_MODE] ?? "ast" : entry._meta.grammarHostMode ?? "ast",
|
|
@@ -372,7 +410,15 @@ function runOnce(entry, input, options, phase, profileState) {
|
|
|
372
410
|
);
|
|
373
411
|
const ctx = {
|
|
374
412
|
trackLines: false,
|
|
375
|
-
...skipGlobalSinks ? { _pmProfile: profile } : {
|
|
413
|
+
...skipGlobalSinks ? { _pmProfile: profile } : {
|
|
414
|
+
...captureRootTrivia ? {
|
|
415
|
+
_rootTriviaLog: selectedRootLog,
|
|
416
|
+
_rootTriviaKindIndex: selectedRootLabelIndex,
|
|
417
|
+
_rootTriviaStrictScopes: true
|
|
418
|
+
} : {},
|
|
419
|
+
_errors: errors,
|
|
420
|
+
...profile === void 0 ? {} : { _pmProfile: profile }
|
|
421
|
+
},
|
|
376
422
|
build: options.build,
|
|
377
423
|
state: options.state,
|
|
378
424
|
...grammarTrivia !== void 0 ? { trivia: grammarTrivia, ...triviaKindLabels ? { triviaKindLabels } : {} } : triviaKindLabels ? { triviaKindLabels } : {},
|
|
@@ -397,9 +443,13 @@ function runOnce(entry, input, options, phase, profileState) {
|
|
|
397
443
|
span: r.span ?? { start: 0, end: 0 },
|
|
398
444
|
expected: r.ok ? [] : r.expected ?? [],
|
|
399
445
|
errors,
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
446
|
+
...selectedRootLog !== void 0 && selectedRootLog.length > 0 ? {
|
|
447
|
+
rootTrivia: {
|
|
448
|
+
rows: selectedRootLog,
|
|
449
|
+
select: rootTriviaSelection,
|
|
450
|
+
index: buildRootTriviaIndex(selectedRootLog, rootTriviaSelection)
|
|
451
|
+
}
|
|
452
|
+
} : {},
|
|
403
453
|
unconsumedFrom
|
|
404
454
|
};
|
|
405
455
|
}
|
|
@@ -458,6 +508,10 @@ var WORDS_RE = new RegExp(`^${WORD_RE_SRC}(?:\\|${WORD_RE_SRC})*$`);
|
|
|
458
508
|
|
|
459
509
|
// src/compiler/scannable-run.ts
|
|
460
510
|
var META = new Set("()[]{}*+?|^$.".split(""));
|
|
511
|
+
var SELECTED_ROOT_OWNED_RANGE_PLACEHOLDER = Array.from(
|
|
512
|
+
{ length: SELECTED_ROOT_STRIDE - 3 },
|
|
513
|
+
() => "0"
|
|
514
|
+
).join(", ");
|
|
461
515
|
|
|
462
516
|
// src/compiler/trivia-fast-path.ts
|
|
463
517
|
var CAP_RECORD = [
|
|
@@ -466,6 +520,11 @@ var CAP_RECORD = [
|
|
|
466
520
|
` if (_cap === 1 && _ctx._cstTriviaLog !== undefined && _ctx.captureTrivia) _ctx._cstTriviaLog.push(_pos, _e, _ctx._cstRawChildren ? _ctx._cstRawChildren.length : 0)`,
|
|
467
521
|
` }`
|
|
468
522
|
].join("\n");
|
|
523
|
+
var SELECTED_ROOT_FINISH = [
|
|
524
|
+
` if (_cap && _ctx._rootTriviaCapture !== false && _ctx._rootTriviaLog !== undefined && _ctx._rootTriviaLog.length !== _rootMark) {`,
|
|
525
|
+
` for (let _ri = _rootMark; _ri < _ctx._rootTriviaLog.length; _ri += ${SELECTED_ROOT_STRIDE}) { _ctx._rootTriviaLog[_ri] = _pos; _ctx._rootTriviaLog[_ri + 1] = _e }`,
|
|
526
|
+
` }`
|
|
527
|
+
].join("\n");
|
|
469
528
|
|
|
470
529
|
// src/compiler/linker.ts
|
|
471
530
|
function normalizeCstCollapse(collapse) {
|