PureYAML/Sources
Mihaela M b7bcfe1a01 fix(parsing): enforce the full YAML 1.2 double-quoted escape table
The double-quoted escape decoder recognized only a subset of escapes
(" \ \/ \b \f \n \r \t \u) and silently passed any other character
through. That accepted invalid escapes such as \. and \', and mangled
valid ones the subset omitted: \x and \U hex escapes, \v \e \0, the named
\N \_ \L \P, and a backslash before a space, were emitted as their literal
letters (\x0d became the text x0d).

The decoder now maps every escape in the YAML 1.2 table to its character,
reads \x (8-bit) and \U (32-bit) hex escapes alongside \u, treats a
backslash before a line break as an escaped line break that joins the
lines with no separator, and rejects an unknown or truncated escape with
a diagnostic. Single-character escapes move to a lookup table so the
decoder stays within the complexity limit.

Measured against the official YAML test-suite, parse-level conformance
rises from 247/333 (74.2%) to 249/333 (74.8%) as two invalid documents
are now rejected, and value-level from 166 to 170 of comparable cases
(90.4%) as the previously-mangled escapes decode correctly, with no
regression.
2026-06-27 16:19:25 +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): enforce the full YAML 1.2 double-quoted escape table 2026-06-27 16:19:25 +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