parseman 0.27.0 → 0.27.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/combinators/grammar.d.ts.map +1 -1
- package/dist/combinators/node.d.ts +8 -0
- package/dist/combinators/node.d.ts.map +1 -1
- package/dist/compiler/codegen.d.ts.map +1 -1
- package/dist/compiler/fields.d.ts +7 -0
- package/dist/compiler/fields.d.ts.map +1 -1
- package/dist/compiler/inline-callback.d.ts.map +1 -1
- package/dist/compiler/ir-serialize.d.ts.map +1 -1
- package/dist/compiler/linker.d.ts.map +1 -1
- package/dist/cst/trivia-entries.d.ts +2 -0
- package/dist/cst/trivia-entries.d.ts.map +1 -1
- package/dist/index.cjs +122 -28
- package/dist/index.cjs.map +2 -2
- package/dist/index.js +122 -28
- package/dist/index.js.map +2 -2
- package/dist/language-service/index.cjs +3 -1
- package/dist/language-service/index.cjs.map +2 -2
- package/dist/language-service/index.js +3 -1
- package/dist/language-service/index.js.map +2 -2
- package/dist/plugin/direct-builder-static.d.ts +8 -0
- package/dist/plugin/direct-builder-static.d.ts.map +1 -0
- package/dist/plugin/evaluator.d.ts.map +1 -1
- package/dist/plugin/index.cjs +305 -39
- package/dist/plugin/index.cjs.map +4 -4
- package/dist/plugin/index.d.ts.map +1 -1
- package/dist/plugin/index.js +305 -39
- package/dist/plugin/index.js.map +4 -4
- package/dist/types.d.ts +4 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -234,7 +234,7 @@ var META = new Set("()[]{}*+?|^$.".split(""));
|
|
|
234
234
|
var CAP_RECORD = [
|
|
235
235
|
` if (_cap && _e > _pos) {`,
|
|
236
236
|
` if (_ctx._triviaLog !== undefined) _ctx._triviaLog.push(_pos, _e)`,
|
|
237
|
-
` if (_ctx._cstTriviaLog !== undefined) _ctx._cstTriviaLog.push(_pos, _e, _ctx._cstRawChildren ? _ctx._cstRawChildren.length : 0)`,
|
|
237
|
+
` if (_ctx._cstTriviaLog !== undefined && _ctx.captureTrivia) _ctx._cstTriviaLog.push(_pos, _e, _ctx._cstRawChildren ? _ctx._cstRawChildren.length : 0)`,
|
|
238
238
|
` }`
|
|
239
239
|
].join("\n");
|
|
240
240
|
|
|
@@ -256,9 +256,11 @@ function cstBuildHost(typeOrOptions, children, _fields, span, rawChildren, trivi
|
|
|
256
256
|
}
|
|
257
257
|
const collapse = normalizeCstCollapse(typeOrOptions?.collapse);
|
|
258
258
|
const host = (type, children2, fields, span2, rawChildren2, triviaLog2, state2) => buildCstNode(type, children2, fields, span2, rawChildren2, triviaLog2, state2);
|
|
259
|
+
host._parsemanCstOutput = true;
|
|
259
260
|
if (collapse) host._parsemanCstCollapse = collapse;
|
|
260
261
|
return host;
|
|
261
262
|
}
|
|
263
|
+
cstBuildHost._parsemanCstOutput = true;
|
|
262
264
|
|
|
263
265
|
// src/cst/walk.ts
|
|
264
266
|
function walk(root, visitor, ctx = void 0) {
|