TomlParse functionv0.1.0

Source
Reads input into a table, or says why it could not and where.
pub func TomlParse(
    allocator: Allocator,
    input: char8[..]
) -> TomlValue ! TomlParseFailure

A refusal gives back no document at all. Whatever had been read when the parser stopped is released here, which is the only place it can be done once — and handing it back would be worse than useless, because a program configured from half a file runs with some settings applied and some defaulted. Fails with any case of TomlParseError, positioned at the byte, line and column where parsing stopped.

Parameters

NameTypeDescription
allocatorAllocatorwhere the document is built
inputchar8[..]the document, as UTF-8 bytes

Returns: the document, or the failure that stopped it