PureYAML/Sources/Parsing
Mihaela M b80e9c1c63 fix(parsing): comments and over-indented blanks ending block scalars
A block scalar terminated by a less-indented comment line failed with a
spurious 'unexpected indentation': once the smaller indentation ended the
scalar, the comment's own column was processed as a dedent, and because no
indentation level held that width the dedent raised an error. A comment's
indentation does not participate in block structure, so a comment that ends
a block scalar is now left for the main loop to scan, with the block
scalar's own first content line (which may itself begin with '#') still
treated as content.

Separately, a whitespace-only line indented past a block scalar's content
level lost its surplus spaces because the width was consumed before the
line was recognized as blank; the surplus is now preserved as the line's
content, so an over-indented blank contributes the correct value.

Measured against the official YAML test-suite, parse-level conformance
rises from 240/333 (72.1%) to 243/333 (73.0%) with matching value-level
gains, and no regression.
2026-06-27 15:34:13 +02:00
..
BlockScalarChomping.swift fix(parsing): classify the keep block-scalar chomping indicator 2026-06-26 07:50:07 +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 refactor(parsing): share merge-key resolution between composers 2026-06-26 05:50:28 +02:00
EventComposer.swift refactor(parsing): share merge-key resolution between composers 2026-06-26 05:50:28 +02:00
EventStreamComposedNode.swift refactor(code-style): one top-level type per source file 2026-06-26 06:14:21 +02:00
EventStreamComposer.swift refactor(code-style): one top-level type per source file 2026-06-26 06:14:21 +02:00
EventStreamComposerMode.swift refactor(code-style): one top-level type per source file 2026-06-26 06:14:21 +02:00
EventStreamContainer.swift refactor(code-style): one top-level type per source file 2026-06-26 06:14:21 +02:00
EventStreamContainerKind.swift refactor(code-style): one top-level type per source file 2026-06-26 06:14:21 +02:00
Mark.swift feat(parsing): add parse event model 2026-06-05 07:16:23 +02:00
MergeResolution.swift refactor(parsing): share merge-key resolution between composers 2026-06-26 05:50:28 +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 refactor(parsing): remove three unreachable ParseError cases 2026-06-26 08:37:53 +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): fold line breaks in multi-line single-quoted scalars 2026-06-26 21:18:55 +02:00
ScalarStyle.swift feat(parsing): compose events into values 2026-06-05 10:07:28 +02:00
Scanner.Directives.swift fix(parsing): ignore an unrecognized directive instead of rejecting it 2026-06-26 22:20:18 +02:00
Scanner.FlowContext.swift refactor(code-style): one top-level type per source file 2026-06-26 06:14:21 +02:00
Scanner.Helpers.swift fix(parsing): comments and over-indented blanks ending block scalars 2026-06-27 15:34:13 +02:00
Scanner.Indentation.swift fix(parsing): comments and over-indented blanks ending block scalars 2026-06-27 15:34:13 +02:00
Scanner.swift fix(parsing): allow a space before the colon of a quoted mapping key 2026-06-27 01:19:28 +02:00
ScannerFlowContextKind.swift refactor(code-style): one top-level type per source file 2026-06-26 06:14:21 +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 refactor(code-style): one top-level type per source file 2026-06-26 06:14:21 +02:00
TokenCursor.swift fix(parsing): preserve blank lines in block scalars 2026-06-26 08:09:45 +02:00
TokenEventParser.Block.swift fix(parsing): preserve leading blank lines in block scalars 2026-06-26 08:42:16 +02:00
TokenEventParser.Flow.swift feat(parser): harden diagnostics and streaming 2026-06-06 07:57:48 +02:00
TokenEventParser.Helpers.swift fix(parsing): allow an anchor or tag on a non-first mapping key 2026-06-27 00:21:38 +02:00
TokenEventParser.swift docs(parsing): document why the nesting bound is necessary and sufficient 2026-06-23 11:08:30 +02:00
TokenKind.swift refactor(code-style): one top-level type per source file 2026-06-26 06:14:21 +02:00