PureYAML/Sources
Mihaela M 28f549311f fix(parsing): reject a block sequence inline after a node property
A block collection must begin on the line after its node properties, so a
block sequence whose first entry sits on the same line as its anchor or tag
('&a - x', '!!seq - x') is malformed. The parser accepted it, anchoring or
tagging the inline sequence.

parseBlockSequence now rejects a sequence whose first block entry shares a
line with the anchor or tag that introduced it, via a small helper to stay
within the complexity and brace-style limits. An anchor or tag on its own
line above the sequence, inside a sequence item ('- &a x'), before a flow
sequence ('&a [x]'), or on a scalar is unaffected; the mapping form is
left alone, since '&a key: value' is a valid anchored key.

Measured against the official YAML test-suite, parse-level conformance
rises from 267/333 (80.2%) to 268/333 (80.5%) with no regression.
2026-06-27 23:14:54 +02:00
..
Coding
Decoding
Emitting
Encoding
Model
Parsing fix(parsing): reject a block sequence inline after a node property 2026-06-27 23:14:54 +02:00
Stream
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
PureYAML.swift