PureYAML/Sources/Parsing
Mihaela Mihaljevic 16da7248c7 fix(parsing): complete flow-collection key and empty-node handling
Implement libyaml's simple-key mechanism for flow context: the scanner records a potential key position before a plain or quoted scalar, an anchor/tag, or a [/{ opener, and a later ':' splices a mappingKey token retroactively in front of that node. This lets a quoted scalar ("k":v), a nested collection ({k}:v), or a property-carrying node (&c c: d) become a flow mapping key. In flow context ':' is always a value indicator and '?' always an explicit-key indicator regardless of the next character (the block-only following-blank lookahead is disabled), so adjacent forms and trailing '?' parse, and multi-line plain keys fold before the ':' is read. The flow parser is rebuilt around the flow_sequence_entry / flow_mapping_key / flow_mapping_value productions, composing empty scalars for absent keys and values. The streaming token cursor now buffers an open flow collection's tokens until it closes so the retroactive key splice stays valid.

Flips 10 official YAML test suite cases (348/402): 4FJ6, 8KB6, 9BXH, 9MMW, CN3R, DFF7, FRK4, NJ66, UT92, CT4Q. Flow collections used as block mapping keys (LX3P, 6BFJ) need the splice in block context and stay tracked. Updates manifest, fixtures, counts, and roadmap.
2026-06-23 23:18:59 +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 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 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 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 feat(parsing): compose events into values 2026-06-05 10:07:28 +02:00
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 fix(parsing): complete flow-collection key and empty-node handling 2026-06-23 23:18:59 +02:00
Scanner.FlowSimpleKey.swift fix(parsing): complete flow-collection key and empty-node handling 2026-06-23 23:18:59 +02:00
Scanner.Helpers.swift fix(parsing): complete flow-collection key and empty-node handling 2026-06-23 23:18:59 +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): complete flow-collection key and empty-node handling 2026-06-23 23:18:59 +02:00
Scanner.swift fix(parsing): complete flow-collection key and empty-node handling 2026-06-23 23:18:59 +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 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): complete flow-collection key and empty-node handling 2026-06-23 23:18:59 +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): complete flow-collection key and empty-node handling 2026-06-23 23:18:59 +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