PureYAML/Sources/Parsing
Mihaela Mihaljevic cdf5f082f8 fix(parsing): support empty (null) nodes in every position
Compose an empty scalar wherever a node is grammatically required but the next token is a structural indicator or line/stream end, mirroring libyaml's process_empty_scalar: after a tag or anchor property with no node, as an absent mapping value (block and flow), as an absent mapping key (both the plain ': v' form and the explicit '?' form), in flow empty key/value forms ({ : }, { , : v }), and for an indented block node following properties. Also fixes a pre-existing block-sequence bug that nested a sibling '-' as a child when only properties remained on the entry line.

Empty scalars resolve through the existing resolver against the empty string, so !!str yields the empty string, bare empty or !!null yields null, and an empty key yields the empty string.

Flips 20 official YAML test suite cases to passing (270/402). CT4Q no longer false-rejects but still value-mismatches on flow plain-scalar folding (a separate gap), so it is reclassified in the manifest rather than removed. Updates the gap manifest, fixtures, counts, and roadmap.
2026-06-23 20:40:40 +02:00
..
BlockScalarChomping.swift fix(parsing): correct block scalar folding and chomping 2026-06-23 20:01:03 +02:00
BlockScalarStyle.swift feat(parsing): add reader scanner core 2026-06-05 07:40:23 +02:00
CollectionStyle.swift feat(parsing): add parse event model 2026-06-05 07:16:23 +02:00
Event.swift feat(parser): add multi-document stream parsing 2026-06-05 14:55:54 +02:00
EventComposer.Merge.swift feat(model): support complex mapping keys 2026-06-05 16:08:45 +02:00
EventComposer.swift feat(model): support complex mapping keys 2026-06-05 16:08:45 +02:00
EventStreamComposer.swift feat(parser): harden diagnostics and streaming 2026-06-06 07:57:48 +02:00
Mark.swift feat(parsing): add parse event model 2026-06-05 07:16:23 +02:00
NodeKind.swift feat(parsing): parse token stream into events 2026-06-05 09:56:18 +02:00
NodeProperties.swift feat(model): support complex mapping keys 2026-06-05 16:08:45 +02:00
NodeResult.swift feat(parsing): parse token stream into events 2026-06-05 09:56:18 +02:00
ParseError.swift fix(parsing): bound nesting depth so pathological input errors instead of crashing 2026-06-23 09:29:45 +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 feat(parsing): compose events into values 2026-06-05 10:07:28 +02:00
Scanner.BlockScalar.swift fix(parsing): correct block scalar folding and chomping 2026-06-23 20:01:03 +02:00
Scanner.Directives.swift feat(parser): add multi-document stream parsing 2026-06-05 14:55:54 +02:00
Scanner.FlowContext.swift feat(parser): harden diagnostics and streaming 2026-06-06 07:57:48 +02:00
Scanner.Helpers.swift feat(parser): harden diagnostics and streaming 2026-06-06 07:57:48 +02:00
Scanner.Indentation.swift fix(parsing): correct block scalar folding and chomping 2026-06-23 20:01:03 +02:00
Scanner.swift fix(parsing): correct block scalar folding and chomping 2026-06-23 20:01:03 +02:00
TagNormalizer.swift feat(tagged): add tag-preserving validation 2026-06-05 15:35:52 +02:00
Text.swift feat(parsing): compose events into values 2026-06-05 10:07:28 +02:00
Token.swift fix(parsing): correct block scalar folding and chomping 2026-06-23 20:01:03 +02:00
TokenCursor.swift fix(parsing): support empty (null) nodes in every position 2026-06-23 20:40:40 +02:00
TokenEventParser.Block.swift fix(parsing): support empty (null) nodes in every position 2026-06-23 20:40:40 +02:00
TokenEventParser.EmptyNode.swift fix(parsing): support empty (null) nodes in every position 2026-06-23 20:40:40 +02:00
TokenEventParser.Flow.swift fix(parsing): support empty (null) nodes in every position 2026-06-23 20:40:40 +02:00
TokenEventParser.Helpers.swift fix(parsing): support empty (null) nodes in every position 2026-06-23 20:40:40 +02:00
TokenEventParser.swift fix(parsing): support empty (null) nodes in every position 2026-06-23 20:40:40 +02:00