PureYAML/Sources
Mihaela M 4941eac711 fix(parsing): parse implicit null mapping keys
A ':' that opens a line with no key before it is a mapping entry with a
null key (': value', a bare ':', or a null-keyed entry among others). The
scanner emitted the ':' with no preceding key, so the parser rejected it
as a missing node.

The scanner now synthesizes the empty key and its node for such a ':'. To
avoid mistaking an explicit key's value indicator for a null key, it tracks
a pending block-level '?' key: a ':' opening a line is that key's value
when one is pending, and only a synthesized null key otherwise. The flag
is set and cleared only at flow depth zero, so a ':' inside a flow complex
key ('? {a: b}' then ': c') does not disturb the pending block key.

Measured against the official YAML test-suite, parse-level conformance
rises from 283/333 (85.0%) to 287/333 (86.2%) with no regression.
2026-06-28 02:53:45 +02:00
..
Coding feat(codable): broaden compatibility coverage 2026-06-05 12:49:20 +02:00
Decoding feat(model): support complex mapping keys 2026-06-05 16:08:45 +02:00
Emitting feat(parser): harden diagnostics and streaming 2026-06-06 07:57:48 +02:00
Encoding feat(model): support complex mapping keys 2026-06-05 16:08:45 +02:00
Model feat(model): support complex mapping keys 2026-06-05 16:08:45 +02:00
Parsing fix(parsing): parse implicit null mapping keys 2026-06-28 02:53:45 +02:00
Stream feat(parser): add multi-document stream parsing 2026-06-05 14:55:54 +02:00
Tagged refactor(code-style): one top-level type per source file 2026-06-26 06:14:21 +02:00
Validation refactor(code-style): one top-level type per source file 2026-06-26 06:14:21 +02:00
API.swift feat(emitting): dump YAML streams 2026-06-05 17:14:41 +02:00
PureYAML.swift feat(tagged): add tag-preserving validation 2026-06-05 15:35:52 +02:00