parseman 0.44.0 → 0.45.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.
Files changed (77) hide show
  1. package/dist/analysis/diagnose.d.ts +118 -0
  2. package/dist/analysis/diagnose.d.ts.map +1 -0
  3. package/dist/analysis/gating.d.ts +9 -9
  4. package/dist/analysis/gating.d.ts.map +1 -1
  5. package/dist/analysis/grammar.d.ts.map +1 -1
  6. package/dist/combinators/choice.d.ts.map +1 -1
  7. package/dist/combinators/dispatch.d.ts +19 -1
  8. package/dist/combinators/dispatch.d.ts.map +1 -1
  9. package/dist/combinators/expect.d.ts.map +1 -1
  10. package/dist/combinators/first-set.d.ts.map +1 -1
  11. package/dist/combinators/node.d.ts +19 -0
  12. package/dist/combinators/node.d.ts.map +1 -1
  13. package/dist/compiler/build-arity.d.ts +28 -0
  14. package/dist/compiler/build-arity.d.ts.map +1 -1
  15. package/dist/compiler/codegen.d.ts +80 -60
  16. package/dist/compiler/codegen.d.ts.map +1 -1
  17. package/dist/compiler/degradation.d.ts +123 -0
  18. package/dist/compiler/degradation.d.ts.map +1 -0
  19. package/dist/compiler/fields.d.ts.map +1 -1
  20. package/dist/compiler/grammar-coverage-ids.d.ts.map +1 -1
  21. package/dist/compiler/inline-build.d.ts.map +1 -1
  22. package/dist/compiler/ir-serialize.d.ts.map +1 -1
  23. package/dist/compiler/linker.d.ts +1 -1
  24. package/dist/compiler/linker.d.ts.map +1 -1
  25. package/dist/coverage.d.ts +13 -0
  26. package/dist/coverage.d.ts.map +1 -1
  27. package/dist/cst/reflection.d.ts.map +1 -1
  28. package/dist/functional/run.d.ts.map +1 -1
  29. package/dist/index.cjs +707 -471
  30. package/dist/index.cjs.map +4 -4
  31. package/dist/index.d.ts +4 -6
  32. package/dist/index.d.ts.map +1 -1
  33. package/dist/index.js +707 -471
  34. package/dist/index.js.map +4 -4
  35. package/dist/language-service/index.cjs +40 -30
  36. package/dist/language-service/index.cjs.map +3 -3
  37. package/dist/language-service/index.js +40 -30
  38. package/dist/language-service/index.js.map +3 -3
  39. package/dist/oracle/digest.d.ts +132 -6
  40. package/dist/oracle/digest.d.ts.map +1 -1
  41. package/dist/oracle/index.cjs +136 -305
  42. package/dist/oracle/index.cjs.map +4 -4
  43. package/dist/oracle/index.d.ts +43 -31
  44. package/dist/oracle/index.d.ts.map +1 -1
  45. package/dist/oracle/index.js +136 -305
  46. package/dist/oracle/index.js.map +4 -4
  47. package/dist/plugin/evaluator.d.ts +3 -0
  48. package/dist/plugin/evaluator.d.ts.map +1 -1
  49. package/dist/plugin/index.cjs +1127 -747
  50. package/dist/plugin/index.cjs.map +4 -4
  51. package/dist/plugin/index.d.ts +18 -0
  52. package/dist/plugin/index.d.ts.map +1 -1
  53. package/dist/plugin/index.js +1127 -747
  54. package/dist/plugin/index.js.map +4 -4
  55. package/dist/plugin/reducer-resolver.d.ts +41 -0
  56. package/dist/plugin/reducer-resolver.d.ts.map +1 -0
  57. package/dist/run/index.cjs +33 -30
  58. package/dist/run/index.cjs.map +2 -2
  59. package/dist/run/index.js +33 -30
  60. package/dist/run/index.js.map +2 -2
  61. package/dist/spec/index.cjs +221 -34
  62. package/dist/spec/index.cjs.map +4 -4
  63. package/dist/spec/index.js +221 -34
  64. package/dist/spec/index.js.map +4 -4
  65. package/dist/spec/model.d.ts.map +1 -1
  66. package/dist/types.d.ts +6 -1
  67. package/dist/types.d.ts.map +1 -1
  68. package/dist/version.d.ts +1 -1
  69. package/package.json +7 -3
  70. package/dist/combinators/guard.d.ts +0 -8
  71. package/dist/combinators/guard.d.ts.map +0 -1
  72. package/dist/cst/offset-model.d.ts +0 -119
  73. package/dist/cst/offset-model.d.ts.map +0 -1
  74. package/dist/oracle/corpus.d.ts +0 -32
  75. package/dist/oracle/corpus.d.ts.map +0 -1
  76. package/dist/oracle/identity.d.ts +0 -117
  77. package/dist/oracle/identity.d.ts.map +0 -1
@@ -0,0 +1,118 @@
1
+ /**
2
+ * The DELIBERATE grammar diagnostic — the one call that asks parseman "is anything
3
+ * wrong with this grammar?" and answers in a form a machine can gate on.
4
+ *
5
+ * Why this exists as its own entry point, and why nothing in `compile()` prints any
6
+ * more: a diagnostic that rides along with the thing that produces the artifact is a
7
+ * diagnostic nobody chose to run. Importing one example grammar used to print ~51
8
+ * lines of gating advice through `console.warn` before a single byte was parsed —
9
+ * advice that was correct, detailed, and read by no one, because it arrived unasked
10
+ * in the middle of an unrelated build log. The same principle is already settled one
11
+ * layer down for codegen ("anything 'diagnostic' doesn't end up in codegen"); this is
12
+ * that principle applied at build time. Compiling produces an artifact and says
13
+ * nothing. Asking for a diagnosis produces a diagnosis.
14
+ *
15
+ * Design rules this surface holds itself to:
16
+ *
17
+ * 1. MACHINE-READABLE FIRST. `diagnoseGrammar()` returns a plain, JSON-serializable
18
+ * object with a versioned `schema` tag. The human rendering is a separate,
19
+ * optional function over that object — never the primary product. A CI job gates
20
+ * on `ok`; a person reads `formatGrammarDiagnosis()`.
21
+ * 2. DETERMINISTIC. Findings are sorted by (severity, code, id). Two runs over the
22
+ * same grammar produce byte-identical JSON, so a diagnosis can be committed as a
23
+ * snapshot and diffed.
24
+ * 3. FAILS CLOSED. An analysis that could not run is NOT a pass. `unanalysable` stays
25
+ * authoritative (see `GatingReport.unanalysable`), it is a BLOCKING finding, and a
26
+ * diagnosis whose analysis THREW is reported as a blocking finding rather than as
27
+ * an empty, clean-looking report.
28
+ * 4. ONE ENTRY POINT. It accepts a combinator, a rule-name→combinator map, a `rules()`
29
+ * map, or a `compose()` result, and figures out which it got. Choosing between
30
+ * `analyzeGating` / `analyzeGatingRules` / `analyzeGrammarGating` is exactly the
31
+ * kind of decision that makes people not bother.
32
+ */
33
+ import type { Combinator } from '../types.ts';
34
+ import { type AnalyzeGatingOptions, type GatingReport } from './gating.ts';
35
+ import { type AnalysableGrammar } from './grammar.ts';
36
+ import { type Degradation } from '../compiler/degradation.ts';
37
+ /** Anything `diagnoseGrammar()` knows how to read. */
38
+ export type DiagnosableGrammar = Combinator<unknown> | AnalysableGrammar | ReadonlyArray<readonly [string, Combinator<unknown>]>;
39
+ /**
40
+ * `blocking` fails `ok` (and therefore a CI gate). `advisory` is reported but does not
41
+ * fail: the author either already acknowledged it (`accepted`) or has nothing to act on.
42
+ */
43
+ export type DiagnosisSeverity = 'blocking' | 'advisory';
44
+ /** Stable, greppable finding class. New codes may be added; existing ones are not renamed. */
45
+ export type DiagnosisCode =
46
+ /** A hot choice with no first-char dispatch — every position enters doomed arms. */
47
+ 'ungated-choice'
48
+ /** An API-misuse pattern in a choice's arms (double-not, leading-not, keyword-regex). */
49
+ | 'anti-pattern'
50
+ /** Part of the grammar could not be examined. A clean report over it is NOT a pass. */
51
+ | 'unanalysable'
52
+ /** The compiler took a correct-but-slower path. Mirrors the `[parseman] degraded` channel. */
53
+ | 'degraded'
54
+ /** An `accept` entry that matched no ungated choice — a stale snapshot line to prune. */
55
+ | 'stale-accept';
56
+ export type DiagnosisFinding = {
57
+ /** Stable identity: the choice id, `rule#arm`, the rule name, or the degradation code. */
58
+ id: string;
59
+ code: DiagnosisCode;
60
+ severity: DiagnosisSeverity;
61
+ /** Rule / node type the finding lands on. */
62
+ rule: string;
63
+ /** One-line statement of what is wrong. */
64
+ message: string;
65
+ /** Arm-level evidence and concrete fixes, one entry per contributing cause. */
66
+ details: string[];
67
+ /** The `accept` snapshot key that would silence this finding, when one exists. */
68
+ acceptKey?: string;
69
+ };
70
+ export type GrammarDiagnosis = {
71
+ /** Versioned so a committed snapshot can be migrated rather than silently reinterpreted. */
72
+ schema: 'parseman.diagnosis/1';
73
+ /**
74
+ * True only when there is no blocking finding. A CI gate is
75
+ * `process.exit(diagnoseGrammar(g).ok ? 0 : 1)` — nothing else to remember.
76
+ */
77
+ ok: boolean;
78
+ summary: {
79
+ totalChoices: number;
80
+ gated: number;
81
+ recoverable: number;
82
+ ungated: number;
83
+ accepted: number;
84
+ deferred: number;
85
+ antiPatterns: number;
86
+ unanalysable: number;
87
+ degraded: number;
88
+ staleAccepts: number;
89
+ };
90
+ /** Sorted (severity, code, id). Deterministic across runs. */
91
+ findings: DiagnosisFinding[];
92
+ /**
93
+ * Every blocking-choice id, sorted — paste straight into `{ accept: [...] }` to
94
+ * acknowledge the current state as intentional.
95
+ */
96
+ acceptSnapshot: string[];
97
+ /** The full underlying gating report, for callers that want the raw per-choice detail. */
98
+ gating: GatingReport;
99
+ /**
100
+ * Degradations recorded WHILE this analysis ran (e.g. an opaque composed artifact).
101
+ * NOT the compile-time set — compiling is a separate act; see `PARSEMAN_DEGRADATION`.
102
+ *
103
+ * Empty when `PARSEMAN_DEGRADATION=off`, because `recordDegradation` short-circuits on
104
+ * the level. That is not a blind spot: everything this analysis can record is ALSO
105
+ * present in `gating.unanalysable`, which no env var can switch off.
106
+ */
107
+ degradations: Degradation[];
108
+ };
109
+ export type DiagnoseOptions = Pick<AnalyzeGatingOptions, 'accept' | 'entryName'>;
110
+ /**
111
+ * Diagnose a grammar. Never throws: an analysis that cannot run is reported as a
112
+ * blocking `unanalysable` finding, because a thrown diagnostic and a clean grammar
113
+ * must not look the same to a caller that wrapped this in a try/catch.
114
+ */
115
+ export declare function diagnoseGrammar(grammar: DiagnosableGrammar, opts?: DiagnoseOptions): GrammarDiagnosis;
116
+ /** Render a diagnosis for a human. The structured object stays the product of record. */
117
+ export declare function formatGrammarDiagnosis(d: GrammarDiagnosis): string[];
118
+ //# sourceMappingURL=diagnose.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diagnose.d.ts","sourceRoot":"","sources":["../../src/analysis/diagnose.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAC7C,OAAO,EAEL,KAAK,oBAAoB,EAAE,KAAK,YAAY,EAC7C,MAAM,aAAa,CAAA;AACpB,OAAO,EAAwB,KAAK,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAC3E,OA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A;QAChB,YAAY,EAAE,MAAM,CAAA;KACrB,CAAA;IACD,8DAA8D;IAC9D,QAAQ,EAAE,gBAAgB,EAAE,CAAA;IAC5B;;;OAGG;IACH,cAAc,EAAE,MAAM,EAAE,CAAA;IACxB,0FAA0F;IAC1F,MAAM,EAAE,YAAY,CAAA;IACpB;;;;;;;OAOG;IACH,YAAY,EAAE,WAAW,EAAE,CAAA;CAC5B,CAAA;AAED,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,oBAAoB,EAAE,QAAQ,GAAG,WAAW,CAAC,CAAA;AAQhF;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,kBAAkB,EAAE,IAAI,CAAC,EAAE,eAAe,GAAG,gBAAgB,CAqBrG;AAED,yFAAyF;AACzF,wBAAgB,sBAAsB,CAAC,CAAC,EAAE,gBAAgB,GAAG,MAAM,EAAE,CA+BpE"}
@@ -10,18 +10,19 @@
10
10
  * the compiler already knows: which choices gate, and for those that don't, which
11
11
  * arm poisons dispatch and why.
12
12
  *
13
- * `analyzeGating()` is the pure programmatic surface. `compile()` runs it by
14
- * default and emits `formatGatingWarnings()` output for genuinely-ungated choices
15
- * (see `src/compiler/codegen.ts`). Accept a deliberately-ungated choice by listing
16
- * its `id` in the gating snapshot allowlist (`analyzeGating(entry, { accept })` /
17
- * `compile(g, { gating: { level, accept } })`) — the single suppression mechanism.
13
+ * `analyzeGating()` is the pure programmatic surface, and `diagnoseGrammar()`
14
+ * (`src/analysis/diagnose.ts`) is the entry point most callers want. `compile()` does
15
+ * NOT run either: a diagnostic is a deliberate act, not a side effect of producing an
16
+ * artifact. Accept a deliberately-ungated choice by listing its `id` in the gating
17
+ * snapshot allowlist (`analyzeGating(entry, { accept })` / `diagnoseGrammar(g, {
18
+ * accept })`) — the single suppression mechanism.
18
19
  *
19
20
  * WHERE the question is asked matters as much as the answer. A SHARED SHAPE — a
20
21
  * `rules()` map referencing a rule it doesn't define (`g.Value`) — has no verdict of
21
22
  * its own: the hole makes every first-set through it `any`, but that configuration is
22
23
  * never executed and its author cannot fix it. Such a choice is `deferred` here, and
23
- * re-asked with `resolveRef` at the site that BINDS the name (`runFusedGatingDiagnostic`
24
- * in codegen.ts) — the artifact that really runs, whose author really can fix it.
24
+ * re-asked with `resolveRef` at the site that BINDS the name — `analyzeGrammarGating`
25
+ * on the fused artifact, which really runs and whose author really can fix it.
25
26
  */
26
27
  import type { Combinator, FirstSet } from '../types.ts';
27
28
  import { type RefResolver } from '../combinators/first-set.ts';
@@ -95,7 +96,7 @@ export type ChoiceGating = {
95
96
  * unresolved NAMED `g.Foo` ref and no two finite arms overlap. The verdict is not
96
97
  * this artifact's to make: the shape module can't fix it (the hole has no body
97
98
  * here) and the configuration it describes never runs. The answer belongs to the
98
- * FUSED artifact, where the name is bound — see `runFusedGatingDiagnostic`.
99
+ * FUSED artifact, where the name is bound — see `analyzeGrammarGating`.
99
100
  *
100
101
  * Deferred choices are excluded from `ungated`: they neither warn nor fail the
101
102
  * `'error'` gate at this site.
@@ -194,7 +195,6 @@ export declare function analyzeGating(entry: Combinator<unknown>, opts?: Analyze
194
195
  * choice is still analyzed exactly once however many rules reach it.
195
196
  */
196
197
  export declare function analyzeGatingRules(ruleMap: ReadonlyArray<readonly [string, Combinator<unknown>]>, opts?: AnalyzeGatingOptions): GatingReport;
197
- export type GatingWarnLevel = 'off' | 'warn' | 'error';
198
198
  /**
199
199
  * Format the genuinely-ungated findings + anti-patterns as ready-to-print lines.
200
200
  * Precise by design: only 'no'-gated choices NOT in the accepted allowlist, plus
@@ -1 +1 @@
1
- {"version":3,"file":"gating.d.ts","sourceRoot":"","sources":["../../src/analysis/gating.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAa,MAAM,aAAa,CAAA;AAClE,OAAO,EAA4B,KAAK,WAAW,EAAE,MAAM,6BAA6B,CAAA;AAExF,+EAA+E;AAC/E,MA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,iBAAiB,EAC1B,IAAI,CAAC,EAAE,oBAAoB,GAC1B,YAAY,CAkBd"}
1
+ {"version":3,"file":"grammar.d.ts","sourceRoot":"","sources":["../../src/analysis/grammar.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAsB,KAAK,oBAAoB,EAAE,KAAK,YAAY,EAAqB,MAAM,aAAa,CAAA;AAIjH,8EAA8E;AAC9E,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAEvD;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,iBAAiB,EAC1B,IAAI,CAAC,EAAE,oBAAoB,GAC1B,YAAY,CAsCd"}
@@ -1 +1 @@
1
- {"version":3,"file":"choice.d.ts","sourceRoot":"","sources":["../../src/combinators/choice.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EAC+B,QAAQ,EAClD,MAAM,aAAa,CAAA;AAKpB,KAAK,SAAS,CAAC,CAAC,IAAI,CAAC,SAAS,QAAQ,CAAC,MAAM,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,GAAG,CAAC,SAAS,UAAU,CAAC,MAAM,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,GAAG,KAAK,CAAA;AACvH,KAAK,SAAS,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,OAAO,CAAC,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAC,EAAE,IAAI;KACrE,CAAC,IAAI,MAAM,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAChC,CAAC,MAAM,CAAC,SAAS,UAAU,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,CAAA;AAEjD,wBAAgB,MAAM,CAAC,CAAC,SAAS,CAAC,UAAU,CAAC,OAAO,CAAC,GAAG,QAAQ,CAAC,OAAO,CAAC,EAAE,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC,GAAG,QA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OAAO,CAAC,GAAG,QAAQ,CAAC,OAAO,CAAC,EAAE,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,EACxH,GAAG,IAAI,EAAE,CAAC,GACT,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CA0J1B;AAgID;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,UAAU,CAAC,OAAO,CAAC,GAAG,UAAU,CAAC,OAAO,CAAC,GAAG,IAAI,CAWrF;AA6CD,uEAAuE;AACvE,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,GAAG,MAAM,GAAG,IAAI,CAKzE;AAED,qEAAqE;AACrE,wBAAgB,eAAe,CAAC,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAMhG"}
@@ -47,7 +47,25 @@ export declare function when<T>(key: DispatchWhenKey, parser: Combinator<T>, opt
47
47
  export declare function when<T>(matcher: DispatchStringMatcher, parser: Combinator<T>, opts?: DispatchWhenOptions): DispatchWhenMatcher<T>;
48
48
  export declare function makeWhen(opts?: DispatchWhenOptions): DispatchWhenFactory;
49
49
  export declare function otherwise<T>(parser: Combinator<T>): DispatchOtherwise<T>;
50
- export declare function routed<T = string>(): Combinator<T>;
50
+ /**
51
+ * Reuse the token the enclosing `dispatch()` already consumed to select this branch,
52
+ * instead of re-recognizing it.
53
+ *
54
+ * With no argument this is dispatch-only: outside a dispatch branch (or at a position
55
+ * other than the selector's) it fails with `expected: ['routed()']`.
56
+ *
57
+ * `routed(fallback)` makes the SAME production usable in both contexts: inside a
58
+ * dispatch branch it reuses the routed token; anywhere else it parses `fallback` in
59
+ * place. That is what collapses a `Routed<X>` twin production into its original —
60
+ * `sequence(routed(Name), Prelude, ';')` replaces the pair
61
+ * `sequence(Name, Prelude, ';')` / `sequence(routed(), Prelude, ';')`, which
62
+ * otherwise differ by exactly one element and duplicate a whole production (and a
63
+ * whole compiled emission) for a one-token difference.
64
+ *
65
+ * A `routed()` in a dispatch SELECTOR is still an error with or without a fallback:
66
+ * the selector is what produces the routed token, so reading it there is misuse.
67
+ */
68
+ export declare function routed<T = string>(fallback?: Combinator<T>): Combinator<T>;
51
69
  export declare function dispatch<S extends string, T extends readonly DispatchArm<unknown>[]>(selector: Combinator<S>, ...arms: T): Combinator<[S, UnionArms<T>]>;
52
70
  export {};
53
71
  //# sourceMappingURL=dispatch.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dispatch.d.ts","sourceRoot":"","sources":["../../src/combinators/dispatch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAA4E,MAAM,aAAa,CAAA;AAIvH,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAA;IAChC,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,CAAA;IAC9B,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAA;IACjC,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAA;CAC9B,CAAA;AAED,MAAM,MAAM,mBAAmB,CAAC,CAAC,IAAI;IACnC,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAA;IAC5B,QAAQ,CAAC,OAAO,EAAE,qBAAqB,CAAA;IACvC,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,CAAA;IAC9B,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAA;IACjC,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAA;CAC9B,CAAA;AAED,MAAM,MAAM,qBAAqB,GAC7B;IAAE,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC;IAAC,QA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;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,GAAG,MAAM,EAAE,CAE/D;AAoED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,MAAM,CAAC,CAAC,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC,CAAC,GAAG,UAAU,CAAC,CA4B/F;AAED,+DAA+D;AAC/D,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,UAAU,CAEhE"}
1
+ {"version":3,"file":"expect.d.ts","sourceRoot":"","sources":["../../src/combinators/expect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAyC,UAAU,EAAE,MAAM,aAAa,CAAA;AAKhG,YAAY,EAAE,UAAU,EAAE,CAAA;AAE1B;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,GAAG,MAAM,EAAE,CAE/D;AAuED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,MAAM,CAAC,CAAC,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC,CAAC,GAAG,UAAU,CAAC,CA4B/F;AAED,+DAA+D;AAC/D,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,UAAU,CAEhE"}
@@ -1 +1 @@
1
- {"version":3,"file":"first-set.d.ts","sourceRoot":"","sources":["../../src/combinators/first-set.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAa,QAAQ,EAAE,UAAU,EAAa,MAAM,aAAa,CAAA;AAE7E;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,UAAU,CAAC,OAAO,CAAC,GAAG,SAAS,CAA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B,mBAAmB,CAAC,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,GAAG,OAAO,CAEnE;AA6BD;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,SAAS,UAAU,CAAC,OAAO,CAAC,EAAE,GAAG,QAAQ,CAalF;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,UAAU,CACxB,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,EACtB,IAAI,GAAE,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC,CAAa,EAC1C,OAAO,CAAC,EAAE,WAAW,GACpB,QAAQ,CAuDV"}
@@ -55,6 +55,25 @@ export type NodeOptions<Tags extends readonly string[] = readonly never[]> = {
55
55
  captureTrivia?: boolean;
56
56
  trailingTrivia?: boolean;
57
57
  tags?: Tags;
58
+ /**
59
+ * Declared positional arity of `build` — the ESCAPE HATCH for a reducer parseman
60
+ * cannot read.
61
+ *
62
+ * Arity gates five capture tiers (`>= 1` children, `>= 2` fields, `>= 4` rawChildren,
63
+ * `>= 5` triviaLog, `>= 6` a clone of `_ctx.state`), and parseman normally derives it
64
+ * from the reducer's declaration — including across module boundaries. A few shapes
65
+ * are genuinely undecidable: a rest parameter (`...args`), a body that reads
66
+ * `arguments`, a reassigned or dynamically constructed reducer. Those fail OPEN, which
67
+ * is safe but pays for every tier on every match, forever.
68
+ *
69
+ * Declaring the arity here turns "undecidable" into "declared". You are asserting the
70
+ * highest positional argument the reducer reads; parseman then elides everything above
71
+ * it exactly as if it had read the parameter list.
72
+ *
73
+ * DECLARING TOO LOW UNDER-CAPTURES: the reducer will receive an empty `rawChildren` /
74
+ * `triviaLog` or an absent `state` rather than a wrong value. Count the parameters.
75
+ */
76
+ buildArity?: number;
58
77
  };
59
78
  export type NodeProjectOptions<I extends number = number> = Omit<NodeOptions, 'project' | 'unwrap' | 'collapse'> & {
60
79
  project: I;
@@ -1 +1 @@
1
- {"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../src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AC,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAAA;AACjS,wBAAgB,IAAI,CAAC,CAAC,EAAE,KAAK,CAAC,IAAI,SAAS,MAAM,EAAE,KAAK,CAAC,IAAI,SAAS,SAAS,MAAM,EAAE,GAAG,SAAS,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,CAAC,OAAO,CAAC,EAAE,KAAK,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,EAAE,WAAW,CAAC,IAAI,CAAC,GAAG,cAAc,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAAA;AAC/O,wBAAgB,IAAI,CAAC,CAAC,EAAE,KAAK,CAAC,IAAI,SAAS,MAAM,EAAE,KAAK,CAAC,IAAI,SAAS,SAAS,MAAM,EAAE,GAAG,SAAS,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,EAAE,WAAW,CAAC,IAAI,CAAC,GAAG,cAAc,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAAA"}
@@ -30,6 +30,34 @@ export declare function cstOutputHost(build: unknown): boolean;
30
30
  * source can't be parsed into a plain identifier list (→ caller keeps full capture).
31
31
  */
32
32
  export declare function confirmedBuildArity(src: string): number | null;
33
+ /**
34
+ * The source a def's arity/shape analysis must read.
35
+ *
36
+ * `buildSrc` is the source text of the EXPRESSION written at the `node(...)` call
37
+ * site. When the reducer is passed as a bare identifier — `node('Foo', p, { build:
38
+ * foldOperation })` — that text is just `"foldOperation"`, which matches no parameter
39
+ * list and used to fail open into all five capture tiers, silently. The macro plugin
40
+ * already holds the whole module's AST, so it resolves such an identifier to its
41
+ * module-scope declaration and parks that declaration's source here. `buildSigSrc` is
42
+ * ANALYSIS-ONLY: it is never emitted, so the generated builder reference is unchanged.
43
+ */
44
+ export declare function buildAnalysisSrc(def: NodeDef): string;
45
+ /**
46
+ * Confirmed formal arity for a node def, reporting once when it cannot be confirmed.
47
+ *
48
+ * Order of authority:
49
+ * 1. `node(..., { buildArity })` — the author DECLARED it. Nothing overrides that.
50
+ * 2. `def.buildArity` as resolved by the macro's reducer resolver (real scope analysis
51
+ * and cross-module import following).
52
+ * 3. Reading the parameter list out of whatever source we have.
53
+ *
54
+ * Fail-open is the correct BEHAVIOR — capturing too much is safe, capturing too little
55
+ * is a correctness bug. Fail-open with no diagnostic was the defect. But a diagnostic is
56
+ * the right answer only for the genuinely undecidable; for everything a static analysis
57
+ * can decide, the right answer is to decide it, which is why (2) exists and why (1) gives
58
+ * the author a way out of (3) entirely.
59
+ */
60
+ export declare function confirmedArityForDef(def: NodeDef): number | null;
33
61
  /** Build reads its 1st (`children`) arg? Unknown/unparseable → true (keep capture). */
34
62
  export declare function buildReadsChildren(def: NodeDef): boolean;
35
63
  /** Build reads its 4th (`rawChildren`) arg? Unknown/unparseable → true (keep capture). */
@@ -1 +1 @@
1
- {"version":3,"file":"build-arity.d.ts","sourceRoot":"","sources":["../../src/compiler/build-arity.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAE5C;;;;;;;;;;GAUG;AAEH,KAAK,OAAO,GAAG,OAAO,CAAC,SAAS,EAAE;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC,CAAA;AAElD;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAErD;AAkBD;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAuB9D;AAED,uFAAuF;AACvF,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAMxD;AAED,0FAA0F;AAC1F,wBAAgB,aAAa,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAMnD;AAED,sFAAsF;AACtF,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAMtD;AAED,sFAAsF;AACtF,wBAAgB,eAAe,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAMrD"}
1
+ {"version":3,"file":"build-arity.d.ts","sourceRoot":"","sources":["../../src/compiler/build-arity.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAG5C;;;;;;;;;;GAUG;AAEH,KAAK,OAAO,GAAG,OAAO,CAAC,SAAS,EAAE;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC,CAAA;AAElD;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAErD;AAgCD;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAgC9D;AAoHD;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAErD;AAmCD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAkBhE;AAED,uFAAuF;AACvF,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAKxD;AAED,0FAA0F;AAC1F,wBAAgB,aAAa,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAKnD;AAED,sFAAsF;AACtF,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAKtD;AAED,sFAAsF;AACtF,wBAAgB,eAAe,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAKrD"}
@@ -8,7 +8,6 @@
8
8
  */
9
9
  import type { Combinator, FirstSet, ParseResult, ParseContext, ParseError } from '../types.ts';
10
10
  import { type HostMode } from '../cst/host-mode.ts';
11
- import { type GatingReport, type GatingWarnLevel } from '../analysis/gating.ts';
12
11
  import { type DuplicationWarnLevel } from '../analysis/duplication.ts';
13
12
  /**
14
13
  * A rule's LEADING first-set as a fuse-resolvable recipe.
@@ -58,12 +57,47 @@ import { type GrammarReflection } from '../cst/reflection.ts';
58
57
  * arity-gates host capture; shared, un-namespaced, mirrors `_EMPTY_TL` placement.
59
58
  */
60
59
  export declare const HOST_READS_DECL = "const _hostReads = (b, n) => { if (b === undefined) return false; let s; try { s = Function.prototype.toString.call(b) } catch (e) { return true } if (/\\barguments\\b/.test(s)) return true; const m = /^[^(]*\\(([\\s\\S]*?)\\)/.exec(s); if (m && /\\.\\.\\.|=/.test(m[1])) return true; return b.length > n }";
60
+ /**
61
+ * Raw-children coercion, hoisted out of every node site.
62
+ *
63
+ * The `rawChildren` entry for a produced value is either the value itself (when it
64
+ * is already a tagged CST thing) or a synthesized leaf. Inlined, that test plus the
65
+ * leaf literal is ~300 bytes emitted PER `node()` site — measured at 2.6% of
66
+ * `example/css`, 7.1% of `probe/node-scale-32`, 11.2% of `probe/trivia-off`.
67
+ *
68
+ * Allocation behaviour is preserved exactly, which is why `span` is the last
69
+ * parameter and may be absent:
70
+ * - line-tracked grammars already hold their span in a local, so they pass it and
71
+ * nothing extra is allocated;
72
+ * - untracked grammars pass nothing and the `{ start, end }` literal is built
73
+ * INSIDE, on the fallback branch only — exactly where the inline form built it.
74
+ * Passing the literal as an argument instead would have allocated a span on the
75
+ * fast path, which is the one thing this hoist must not do.
76
+ */
77
+ export declare const RAW_ENTRY_DECL = "const _rawEntry = (v, input, s, e, span) => (typeof v === 'object' && v !== null && (v._tag === 'node' || v._tag === 'leaf' || v._tag === 'parseError')) ? v : { _tag: 'leaf', value: typeof v === 'string' ? v : (typeof v === 'object' && v !== null ? input.slice(s, e) : ''), span: span ?? { start: s, end: e } }";
61
78
  export declare const LINE_TRACK_DECL = "const _trackLines = (_ctx, input, start, end) => { const from = _ctx._lineScannedTo ?? 0; if (end <= from) return; for (let i = from; i < end; i++) if (input.charCodeAt(i) === 10) _ctx._lineStarts.push(i + 1); _ctx._lineScannedTo = end }";
62
79
  export declare const LINE_SPAN_DECL: string;
63
80
  /** Begin capturing regexes that fall back to `RegExp.exec` (didn't lower). */
64
81
  export declare function beginLoweringCapture(): void;
65
82
  /** Stop capturing and return the un-lowered regex sources seen since begin. */
66
83
  export declare function endLoweringCapture(): string[];
84
+ /** One emitted function whose inline budget was spent, and what it cost. */
85
+ export type InlineCapSite = {
86
+ /** The emitted function that hit the budget. */
87
+ fn: string;
88
+ /** Approximate combinator nodes in the ref body that became a call instead. */
89
+ nodes: number;
90
+ };
91
+ /** Begin collecting inline-cap sites. */
92
+ export declare function beginInlineCapCapture(): void;
93
+ /** Stop collecting and return the sites, in emission order (deterministic). */
94
+ export declare function endInlineCapCapture(): InlineCapSite[];
95
+ /**
96
+ * One line per capped function, in the shape the degradation formatter uses so the two
97
+ * read alike. Says exactly what happened and exactly what to do about it, because a
98
+ * diagnostic that does neither is noise.
99
+ */
100
+ export declare function formatInlineCapSites(sites: readonly InlineCapSite[], max: number): string[];
67
101
  export declare function firstSetCond(codeVar: string, fs: FirstSet): string;
68
102
  export declare function __setForceDisjointIf(on: boolean): void;
69
103
  export declare function __setForceNoSharedPrefix(on: boolean): void;
@@ -94,15 +128,48 @@ export type CompiledParser<T> = {
94
128
  inlineExpression: string | null;
95
129
  /** Present only when compiled with `{ coverage: true }`. */
96
130
  coverageDefinitions?: readonly import('./grammar-coverage-ids.ts').GrammarCoverageDefinition[];
97
- /**
98
- * Static first-char gating diagnostic for this grammar (per-choice gated/
99
- * recoverable/ungated + offending arm + cause + anti-patterns). Computed unless
100
- * `{ gating: 'off' }`. Warnings for genuinely-ungated hot choices are emitted at
101
- * compile time by default (see the `gating` option); this is the programmatic
102
- * view for CI budget snapshots. See `src/analysis/gating.ts`.
103
- */
104
- gating?: GatingReport;
105
131
  };
132
+ /**
133
+ * INLINE EXPANSION CAP — a bound on how much one emitted function may grow by pasting
134
+ * single-use ref bodies into it.
135
+ *
136
+ * The decision procedure, in one sentence: **each emitted function gets a budget of
137
+ * `INLINE_MAX_NODES` combinator nodes of inlined single-use refs; once it is spent, the
138
+ * remaining single-use refs in that function become named functions and are called.**
139
+ *
140
+ * What this limits, precisely. `emitLazy` inlines a ref that is used ONCE and is not
141
+ * recursive, because hoisting a function nobody else calls is pure overhead. That is
142
+ * correct per ref and unbounded in aggregate: a rule whose body is a chain of
143
+ * single-use helpers expands transitively, and the expansion has no ceiling that a
144
+ * grammar author can see or predict. This is NOT the identity-keyed hoisting of a
145
+ * MULTIPLY-referenced subtree (`HOIST_MIN_SUBTREE` above) — that already works, and a
146
+ * shared object referenced 1 or 38 times emits flat. Conflating the two is what made
147
+ * the size problem look like a duplication problem.
148
+ *
149
+ * Why a per-function budget rather than a per-ref size limit or a whole-artifact budget:
150
+ * - a per-ref limit bounds each paste but not the transitive total, which is the
151
+ * quantity that actually grows;
152
+ * - a whole-artifact budget needs an eviction order, and any order that depends on
153
+ * which function was compiled first is a decision the author cannot predict;
154
+ * - a per-function budget needs no eviction order at all. Emission order within one
155
+ * function is the grammar's own left-to-right order, so "the refs after the budget
156
+ * runs out" is stable and explainable.
157
+ *
158
+ * Charge unit is `subtreeSizes` — the same approximate node count `HOIST_MIN_SUBTREE`
159
+ * uses, so the two policies are denominated in one currency.
160
+ *
161
+ * The default is measured, not chosen by taste: see `bench/size/inline-cap.md` for the
162
+ * size/speed sweep this number came from.
163
+ */
164
+ export declare const INLINE_MAX_NODES = 1000;
165
+ /**
166
+ * Resolve the cap: explicit option wins, then `PARSEMAN_MAX_INLINE`, then the default.
167
+ * The escape hatch is deliberately explicit and OFF by default — a grammar that really
168
+ * wants unbounded inlining sets `Infinity` and says so, rather than discovering that a
169
+ * silent policy took it away. Read ONCE per compile and stored on the ctx, so a single
170
+ * compile can never observe two different values.
171
+ */
172
+ export declare function resolveInlineMax(explicit?: number): number;
106
173
  /**
107
174
  * Dependency manifest for the linkable form: for each rule in the map, the set
108
175
  * of OTHER rule names its body references (by name). A referenced rule is a
@@ -121,54 +188,6 @@ export declare function ruleDependencies(ruleMap: ReadonlyArray<readonly [string
121
188
  *
122
189
  * @see https://www.greadme.com/blog/security/what-is-content-security-policy-complete-guide
123
190
  */
124
- /**
125
- * Resolve the gating-diagnostic level: explicit option wins, else the
126
- * `PARSEMAN_GATING` env var, else default-on `'warn'`. `'off'` skips the analysis
127
- * entirely; `'warn'` prints via `console.warn`; `'error'` throws when any
128
- * genuinely-ungated hot choice (or anti-pattern) is found.
129
- */
130
- /**
131
- * The `gating` compile option. A bare level is shorthand for `{ level }`; the
132
- * object form adds the accepted-snapshot `accept` allowlist (choice ids that are
133
- * intentionally ungated — silent, and excluded from the `'error'` gate).
134
- */
135
- export type GatingOption = GatingWarnLevel | {
136
- level?: GatingWarnLevel;
137
- accept?: Iterable<string>;
138
- entryName?: string;
139
- };
140
- /**
141
- * The FUSE-time form of the diagnostic — the only site where a shared shape's
142
- * `g.Foo` hole has an answer.
143
- *
144
- * A shape module (`rules(g => ({ Term: choice(sequence(g.Value, …), …) }))`) cannot
145
- * decide whether `Term` gates: `g.Value` is unbound there, so its first-set reads
146
- * `any`. `analyzeGatingRules` marks such a choice `deferred` rather than `ungated` —
147
- * warning about it would describe a configuration that never runs, and its author
148
- * has nothing to fix. This runs the SAME analysis over the fused winner map, where
149
- * `Value` is bound, and reports what the binding actually produced.
150
- *
151
- * Threading `gating` into the per-piece `compileLinkable` calls would NOT do this:
152
- * each piece is lowered alone, so the hole is still unbound and the shape's own false
153
- * positive is simply re-emitted. Resolution needs the MERGED map.
154
- *
155
- * Reports ONLY choices their authoring site deferred (the local, resolver-free pass
156
- * names them). That is what keeps an ordinary hole-free grammar from being warned
157
- * about twice — once by `compileRuleMap` and again by every `compose()` that fuses
158
- * it. Anti-patterns are structural and already reported at the authoring site, so
159
- * they are dropped here for the same reason.
160
- *
161
- * The rule maps arrive as a THUNK because producing them costs a re-hydration of the
162
- * carried IR: `gating: 'off'` must not pay for a diagnostic it will not print.
163
- */
164
- export declare function runFusedGatingDiagnostic(getRuleMaps: () => ReadonlyArray<ReadonlyArray<readonly [string, Combinator<unknown>]>>, opt?: GatingOption,
165
- /** Carried pieces that could NOT be re-lowered to combinators (opaque precompiled
166
- * artifacts). Threaded by BOTH engines — the runtime linker and the macro plugin —
167
- * so neither can report a clean fuse over a grammar it only partly saw. */
168
- getOpaque?: () => ReadonlyArray<{
169
- ns: string;
170
- ruleNames: string[];
171
- }>): GatingReport | undefined;
172
191
  /**
173
192
  * The `duplication` compile option. A bare level is shorthand for `{ level }`; the
174
193
  * object form adds the `accept` allowlist (finding ids acknowledged as intentional)
@@ -192,9 +211,9 @@ export declare function compile<T>(combinator: Combinator<T>, mapFnSources?: str
192
211
  recovery?: boolean;
193
212
  hostMode?: HostMode;
194
213
  coverage?: boolean;
195
- gating?: GatingOption;
196
214
  duplication?: DuplicationOption;
197
215
  trackLines?: boolean;
216
+ maxInline?: number;
198
217
  }): CompiledParser<T>;
199
218
  export declare function compileRuleMap(ruleMap: ReadonlyArray<readonly [string, Combinator<unknown>]>, opts?: {
200
219
  trivia?: Combinator<unknown>;
@@ -203,8 +222,8 @@ export declare function compileRuleMap(ruleMap: ReadonlyArray<readonly [string,
203
222
  hostMode?: HostMode;
204
223
  trackLines?: boolean;
205
224
  coverage?: boolean;
206
- gating?: GatingOption;
207
225
  duplication?: DuplicationOption;
226
+ maxInline?: number;
208
227
  }): {
209
228
  keys: string[];
210
229
  replacement: string;
@@ -269,6 +288,7 @@ export type LinkablePieces = {
269
288
  deps: Map<string, string[]>;
270
289
  needsEmptyTl: boolean;
271
290
  needsHostReads: boolean;
291
+ needsRawEntry: boolean;
272
292
  /** Compile-time host mode this piece was lowered for ('ast' when absent). */
273
293
  hostMode?: HostMode;
274
294
  /** Set when a direct builder's positioned-CST branch was omitted. */
@@ -296,8 +316,8 @@ export declare function compileLinkable(ruleMapArg: ReadonlyArray<readonly [stri
296
316
  trackLines?: boolean;
297
317
  captureTerminals?: boolean;
298
318
  coverage?: GrammarCoveragePlan;
299
- gating?: GatingOption;
300
319
  duplication?: DuplicationOption;
320
+ maxInline?: number;
301
321
  }): LinkablePieces | null;
302
322
  /**
303
323
  * Does this rule map reference a rule it doesn't define — a NAMED `ref` (`g.Foo`)
@@ -1 +1 @@
1
- {"version":3,"file":"codegen.d.ts","sourceRoot":"","sources":["../../src/compiler/codegen.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAAE,UAAU,EAAa,QAAQ,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAA4B,MAAM,aAAa,CAAA;AAKnI,OAAO,EAA4B,KAAK,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AAC7E,OAAO,EAA2D,KAAK,YAAY,EAAE,KAAK,eAAe,EAAqB,MAAM,uBAAuB,CAAA;AAC3J,OAAO,EAA2H,KAAK,oBAAoB,EAAE,MAAM,4BAA4B,CAAA;AAE/L;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAOH,MAAM,MAAM,WAAW,GAAG;IAAE,GAAG,EAAE,QAAQ,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA;AAC5E,MAAM,MAAM,cAAc,GAAG;IAAE,IAAI,EAAE,WAAW,EAAE,EAAE,CAAA;CAAE,CAAA;AACtD,wBAAgB,qBAAqB,CAAC,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,EAAE,IAAI,GAAE,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC,CAAa,GAAG,cAAc,CA8FxH;AAGD,OAAO,EAAoB,KAAK,mBAAmB,EAAE,MAAM,2BAA2B,CAAA;AAuBtF,OAAO,EAA4B,KAAK,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAEvF;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe,uTAC0R,CAAA;AAE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