feat(std/toml): read and write TOML 1.x as a tree and through Encode and Decode #285
Loading…
Reference in a new issue
No description provided.
Delete branch "loop/77-std-toml"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #77
Adds
std/toml: TOML 1.0 and 1.1 as a format ofstd/encoding, per the refine comment on #77.Toml { naming, strict, version }withencode,decode,parse,valueandwrite;TomlVersion { Toml10, Toml11 }chooses what the writer emits, the reader takes the union of every released 1.x.TomlValue/TomlEntrytree in document order;TomlDate,TomlTime,TomlLocalDateTime,TomlOffsetDateTimewith nanoseconds and an offset in minutes,show()as RFC 3339, wrappers named by type,TomlOffsetDateTime.toTimestamp().TomlErrorwith line and column for syntax and structure errors. NoFormat<TomlError>and no framer.tests/suite-cases.trb), and the write-back of every valid case is an equal tree for both versions. Plus 73 unit tests intoml.test.trb.docs/standard-library/toml.md, the index entry, the ROADMAP note and the regenerated skill.Notes for review:
TomlOffsetDateTime.toTimestamp()returnsTimestamp?(None beyond what a Timestamp holds).TomlValue.equalsignores key order of tables and countsnanequal tonan.torb format --check,torb check, VM tests (1315 pass),docs check,docs index/skill --check,doc --check --no-run. The rest runs in CI.eedd500f2dc06f0383beApproved.
toTimestamp.versiononly controls writing,encodereturnsResult, noFormat<TomlError>/framer); the documented caveats (equals ignores table key order, 11 non-UTF-8 suite files skipped) are stated in the PR body.std/tomlpackage, its page, index entry, ROADMAP note and regenerated skill only; no compiler or runtime change.docs check/skill --checkgreen.Non-blocking: none.
std/toml#77