Expand description
YAML parser groundwork for long-term Panache integration.
This module is intentionally minimal and currently acts as a placeholder for a future in-tree YAML parser that can produce Panache-compatible CST structures. Initial goals:
- support plain YAML and hashpipe-prefixed YAML from shared parsing primitives,
- preserve lossless syntax/trivia needed for exact host document ranges,
- enable shadow-mode comparison against the existing YAML engine before rollout.
- prepare for first-class YAML formatting support once parser parity is proven.
Modules§
Structs§
- Shadow
Parser V2Report - Public byte-completeness report from running the v2 parser scaffold
over an input. The harness in
tests/yaml.rsuses this to gate each step-11 sub-commit on losslessness. - Shadow
Scanner Report - Byte-completeness report from running the streaming scanner over an input. Used by the integration harness to gate the cutover (step 12) — until every allowlisted fixture is covered byte-completely with no overlaps or gaps, the new scanner cannot replace the line-based lexer.
- Shadow
Yaml Options - Shadow
Yaml Report - Yaml
Diagnostic - Yaml
Parse Report
Enums§
Functions§
- parse_
shadow - Parse YAML in shadow mode using prototype groundwork only.
- parse_
v2 - Drive the scanner over
inputand build a CST. Always returns aSyntaxNode— the scanner is permissive and the v2 builder preserves bytes regardless of well-formedness. - parse_
yaml_ report - Parse prototype YAML tree structure and include diagnostics on failure.
- parse_
yaml_ tree - Parse prototype YAML tree structure from input
- project_
events - Walk the shadow CST for
inputand return the projected yaml-test-suite event stream. Returns an empty vector if the input fails to parse. - project_
events_ from_ tree - Walk a shadow-parser CST and return the projected yaml-test-suite event
stream. Decoupled from
parse_yaml_treeso the v2 parser can reuse the same projection for parity comparisons. - shadow_
parser_ v2_ check - Run the v2 parser and return a losslessness report. Exposed so the integration harness can run over allowlisted fixtures without depending on private types.
- shadow_
scanner_ check - Drive the streaming scanner to completion over
inputand return a byte-completeness report. This is exposed so the integration harness intests/yaml.rscan run the scanner over every allowlisted fixture without depending on internalToken/Scannertypes.