PureYAML/Sources/Parsing
Mihaela Mihaljevic 1875d66d46 fix(parsing): parse multi-line and block scalars at the document root
Model libyaml's parser->indent (the enclosing block-collection column, -1 at the bare root) separately from per-line indentation, via a blockIndent stack that rolls on block-sequence entries and mapping keys, unrolls at each block-line start, and resets at document boundaries. Plain-scalar continuation folding now compares against blockIndent, so a root scalar folds its column-0 continuations (single break to space, blank line to newline, per-line whitespace stripped) while a scalar inside a collection still ends at a sibling line. The ':' value indicator deliberately does not roll the block indent.

A '---' document-start marker may now be followed by the document's root node on the same line ('--- foo', '--- [1, 2]', '--- |', '--- >'), and a block scalar whose body sits at the document root's column 0 is captured and ends at the next '---'/'...' marker.

Flips 33 official YAML test suite cases (338/402): 18 false-rejects and 12 value mismatches now match, and 3 invalid inputs (9KBC, ZVH3, 9MQT/01) are now correctly rejected. M7A3 and NB6Z now parse but with mismatched values (separate multi-doc and tab-folding gaps) and stay tracked. Adds root multi-line plain scalar regression tests; updates manifest, fixtures, counts, and roadmap.
2026-06-23 22:56:33 +02:00
..
BlockScalarChomping.swift fix(parsing): correct block scalar folding and chomping 2026-06-23 20:01:03 +02:00
BlockScalarStyle.swift
CollectionStyle.swift
Event.swift
EventComposer.Merge.swift feat(model): support complex mapping keys 2026-06-05 16:08:45 +02:00
EventComposer.swift fix(parsing): accept anchors, tags, and aliases as mapping keys 2026-06-23 21:07:47 +02:00
EventStreamComposer.swift fix(parsing): accept anchors, tags, and aliases as mapping keys 2026-06-23 21:07:47 +02:00
Mark.swift
NodeKind.swift
NodeProperties.swift feat(model): support complex mapping keys 2026-06-05 16:08:45 +02:00
NodeResult.swift
ParseError.swift feat(parsing): handle directives and document-end boundaries 2026-06-23 21:31:58 +02:00
Parser.Events.swift feat(parser): harden diagnostics and streaming 2026-06-06 07:57:48 +02:00
Parser.ScalarComposition.swift feat(tagged): add tag-preserving validation 2026-06-05 15:35:52 +02:00
Parser.swift feat(parser): harden diagnostics and streaming 2026-06-06 07:57:48 +02:00
Reader.swift feat(parser): harden diagnostics and streaming 2026-06-06 07:57:48 +02:00
Scalar.swift fix(parsing): apply flow folding to quoted scalars 2026-06-23 20:17:56 +02:00
ScalarStyle.swift
Scanner.BlockScalar.swift fix(parsing): parse multi-line and block scalars at the document root 2026-06-23 22:56:33 +02:00
Scanner.Directives.swift fix(parsing): parse multi-line and block scalars at the document root 2026-06-23 22:56:33 +02:00
Scanner.FlowContext.swift feat(parser): harden diagnostics and streaming 2026-06-06 07:57:48 +02:00
Scanner.Helpers.swift fix(parsing): parse multi-line and block scalars at the document root 2026-06-23 22:56:33 +02:00
Scanner.Indentation.swift fix(parsing): parse multi-line and block scalars at the document root 2026-06-23 22:56:33 +02:00
Scanner.PropertyTokens.swift fix(parsing): parse multi-line and block scalars at the document root 2026-06-23 22:56:33 +02:00
Scanner.swift fix(parsing): parse multi-line and block scalars at the document root 2026-06-23 22:56:33 +02:00
Scanner.Tabs.swift fix(parsing): reject invalid input that was wrongly accepted 2026-06-23 22:13:35 +02:00
TagNormalizer.swift feat(tagged): add tag-preserving validation 2026-06-05 15:35:52 +02:00
Text.swift
Token.swift fix(parsing): correct block scalar folding and chomping 2026-06-23 20:01:03 +02:00
TokenCursor.swift feat(parsing): handle directives and document-end boundaries 2026-06-23 21:31:58 +02:00
TokenEventParser.Block.swift fix(parsing): accept anchors, tags, and aliases as mapping keys 2026-06-23 21:07:47 +02:00
TokenEventParser.EmptyNode.swift fix(parsing): accept anchors, tags, and aliases as mapping keys 2026-06-23 21:07:47 +02:00
TokenEventParser.Flow.swift fix(parsing): accept anchors, tags, and aliases as mapping keys 2026-06-23 21:07:47 +02:00
TokenEventParser.Helpers.swift fix(parsing): accept anchors, tags, and aliases as mapping keys 2026-06-23 21:07:47 +02:00
TokenEventParser.swift fix(parsing): reject invalid input that was wrongly accepted 2026-06-23 22:13:35 +02:00