.. default-domain:: chpl .. module:: TomlParser :synopsis: Parser module with the Toml class for the Chapel TOML library. TomlParser ========== **Usage** .. code-block:: chapel use TOML.TomlParser; or .. code-block:: chapel import TOML.TomlParser; Parser module with the Toml class for the Chapel TOML library. .. data:: config const debugTomlParser = false Prints a line by line output of parsing process .. class:: Toml : writeSerializable Class to hold various types parsed from input used to recursively hold tables and respective values .. method:: proc init() .. method:: proc init(s: string) .. method:: proc init(A: [?D] shared Toml) where D.isAssociative() .. method:: proc init(ld: date) .. method:: proc init(ti: time) .. method:: proc init(dt: dateTime) .. method:: proc init(i: int) .. method:: proc init(boo: bool) .. method:: proc init(re: real) .. method:: proc init(arr: [?dom] shared Toml) where dom.isAssociative() == false .. method:: proc init(lst: list(shared Toml)) .. method:: proc init(root: Toml) .. method:: proc this(tbl: string) ref: shared Toml? throws Returns the index of the table path given as a parameter .. method:: proc set(tbl: string, toml: Toml) .. method:: proc set(tbl: string, s: string) .. method:: proc set(tbl: string, i: int) .. method:: proc set(tbl: string, b: bool) .. method:: proc set(tbl: string, r: real) .. method:: proc set(tbl: string, ld: date) .. method:: proc set(tbl: string, ti: time) .. method:: proc set(tbl: string, dt: dateTime) .. method:: proc set(tbl: string, A: [?D] shared Toml?) where D.isAssociative() .. method:: proc set(tbl: string, arr: [?dom] shared Toml?) where !dom.isAssociative() .. method:: override proc serialize(writer, ref serializer) throws Write a Table to channel f in TOML format .. method:: proc writeTOML(f) Write a Table to channel f in TOML format .. method:: proc writeJSON(f) Write a Table to channel f in JSON format .. method:: proc toString(): string For the user to write values of a node as follows: Toml[key].toString() .. method:: proc tomlType: string throws Return Toml type as a string. Valid types include: - *empty* - *string* - *integer* - *float* - *boolean* - *datetime* - *array* - *toml* (inline table)