PureYAML/Sources/Parsing
Mihaela M 143624be08 fix(parsing): fold an explicit key ending at its value colon
A plain scalar continuation that ends at a `:` is normally a new implicit
mapping key, so the scalar stops before it. Under an explicit key (`? foo`
then `bar :`) the `:` is the key's own value indicator instead, so the line is
still key content. The scalar dropped that line and the parser stalled, so
`? foo` then `bar : baz` failed rather than yielding the key `foo bar`.

When the explicit-key marker is pending, fold the continuation line in and
stop, leaving the `:` to be scanned as the value indicator. An implicit key
keeps the previous behaviour, so a continuation ending at `:` still begins a
new key.

The test-suite rates are unchanged, since no comparable case isolates the
block form and the flow form needs separate explicit-key work, but block
explicit keys spanning lines now fold correctly. 466 tests pass.
2026-06-29 00:59:18 +02:00
..
BlockScalarChomping.swift
BlockScalarStyle.swift
CollectionStyle.swift
Event.swift
EventComposer.Merge.swift
EventComposer.swift
EventStreamComposedNode.swift
EventStreamComposer.swift
EventStreamComposerMode.swift
EventStreamContainer.swift
EventStreamContainerKind.swift
Mark.swift
MergeResolution.swift
NodeKind.swift
NodeProperties.swift
NodeResult.swift
ParseError.swift
Parser.Events.swift
Parser.ScalarComposition.swift fix(parsing): keep a non-core-tagged scalar as a string 2026-06-28 22:25:48 +02:00
Parser.swift
Reader.swift
Scalar.swift
ScalarStyle.swift
Scanner.Directives.swift fix(parsing): parse a bare document after a document-end marker 2026-06-28 04:23:06 +02:00
Scanner.FlowContext.swift
Scanner.FlowKey.swift fix(parsing): parse a flow collection before a colon as a mapping key 2026-06-28 18:34:11 +02:00
Scanner.Helpers.swift fix(parsing): fold an explicit key ending at its value colon 2026-06-29 00:59:18 +02:00
Scanner.Indentation.swift fix(parsing): base an inline-mapping indent indicator on the mapping 2026-06-28 23:24:21 +02:00
Scanner.Scalars.swift fix(parsing): base an inline-mapping indent indicator on the mapping 2026-06-28 23:24:21 +02:00
Scanner.swift fix(parsing): base an inline-mapping indent indicator on the mapping 2026-06-28 23:24:21 +02:00
ScannerFlowContextKind.swift
TagNormalizer.swift
Text.swift
Token.swift
TokenCursor.swift fix(parsing): reject a block entry after a flow collection on a line 2026-06-28 01:34:55 +02:00
TokenEventParser.Block.swift fix(parsing): bound a block sequence to its own column for siblings 2026-06-28 22:37:36 +02:00
TokenEventParser.Flow.swift fix(parsing): treat colon-led flow sequence element as empty-key map 2026-06-28 19:43:56 +02:00
TokenEventParser.Helpers.swift fix(parsing): reject a later under-indented property on a mapping value 2026-06-28 01:44:48 +02:00
TokenEventParser.swift fix(parsing): parse a bare document after a document-end marker 2026-06-28 04:23:06 +02:00
TokenKind.swift