var doc = parse_toml(text) # raises "<line>: <why>" on bad input
doc.get(["pipelines", "gharchive", "workers"]) # Optional[TomlValue]
doc.tables(["pipelines"]) # the tables directly under it
Supported, as TOML 1.0 has them: comments, [table] headers with bare,
quoted and dotted keys, key = value with dotted keys, basic strings (with
every escape) and literal strings, integers (decimal, with _ between
digits), floats, booleans, arrays of those (over several lines, with
comments and a trailing comma), inline tables, nested, and arrays of inline
tables, inline (machines = [{ type = "cax31", wait = 600 }, ...]) or as
[[x]] headers, nested too ([[version.step]] adds to the last
[[version]]). A key or table
defined twice, a dotted key extending a table a header defined, and a header
reopening an inline table are refused, as TOML refuses them. Not supported,
each refused with a message saying so: multi-line strings, dates and times, hexadecimal, octal and binary integers,
inf and nan, arrays of arrays, arrays mixing tables with other values,
and keys holding control characters.
The document is flat: an entry per table and per value, in the order the
file has them, each with its whole key path, so a reader looks values up by
path and a new key needs no new type. An array of tables is an ARRAY
entry whose items are its elements' indices, of kind TABLE, and each
element a table at the array's path and its index: machines.0.type. mojoshelf's mojo-toml is built for
Mojo before 1.0, which is why orca has its own.