protocol
toml_protocol
TOML parser and generator protocol.
Availability:
logtalk_load(toml(loader))Author: Paulo Moura
Version: 1:0:0
Date: 2026-04-09
Compilation flags:
staticDependencies:
(none)
Remarks:
(none)
Inherited public predicates:
(none)
Public predicates
parse/2
Parses TOML content read from the given source (file(Path), stream(Stream), codes(Codes), chars(Chars), or atom(Atom)) into a ground term representing the parsed TOML document.
Compilation flags:
staticTemplate:
parse(Source,TOML)Mode and number of proofs:
parse(++compound,--ground) - zero_or_oneExceptions:
Source is a variable:instantiation_errorSource is neither a variable nor a valid source:domain_error(toml_source,Source)generate/2
Generates TOML output using the representation specified in the first argument (file(Path), stream(Stream), codes(Codes), chars(Chars), or atom(Atom)) from the ground TOML term in the second argument.
Compilation flags:
staticTemplate:
generate(Sink,TOML)Mode and number of proofs:
generate(++compound,+ground) - one_or_errorExceptions:
Sink is a variable:instantiation_errorTOML is a variable:instantiation_errorTOML is not a valid TOML term:domain_error(toml_term,TOML)Sink cannot be generated:domain_error(toml_sink,Sink)Protected predicates
(none)
Private predicates
(none)
Operators
(none)