Breaking release implementing Ktav specification 0.5.0.
Breaking
- Typed markers
:iand:fremoved. Numbers, booleans, andnull
are inferred from the scalar's lexical form (spec §§ 3.6, 5.2).
port: 8080now yieldsint(8080); useport:: 8080to keep a String. - Comments use
##(line-start only). A single#byte is content —
color: #FF0000is a valid string value. - Inline compounds
{k: v, …}/[i, …]are now valid (spec § 5.8).
TheInlineNonEmptyCompounderror is no longer emitted by the parser.
Added
ktav.emit_canonical(obj)— emit the normalised (spec § 5.9)
byte-deterministic canonical form of a Python value.- Number literal grammar — hex (
0x), octal (0o), binary (0b),
decimal, and underscore separators; i64 overflow falls back to String. - Eight escape sequences in inline scalars (spec § 3.7):
\\,\,,\},\],\{,\[,\n,\r.
Changed
- License:
MIT→MIT OR Apache-2.0. AddedLICENSE-APACHE;
renamedLICENSE→LICENSE-MIT. - Spec submodule pinned to
v0.5.0. - Picked up
ktav 0.5.0.