use TOML.TomlParser;


import TOML.TomlParser;

Parser module with the Toml class for the Chapel TOML library.

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

proc init()
proc init(s: string)
proc init(A: [?D] shared Toml)  where D.isAssociative()
proc init(ld: date)
proc init(ti: time)
proc init(dt: dateTime)
proc init(i: int)
proc init(boo: bool)
proc init(re: real)
proc init(arr: [?dom] shared Toml)  where dom.isAssociative() == false
proc init(lst: list(shared Toml))
proc init(root: Toml)
proc this(tbl: string) ref : shared Toml? throws

Returns the index of the table path given as a parameter

proc set(tbl: string, toml: Toml)
proc set(tbl: string, s: string)
proc set(tbl: string, i: int)
proc set(tbl: string, b: bool)
proc set(tbl: string, r: real)
proc set(tbl: string, ld: date)
proc set(tbl: string, ti: time)
proc set(tbl: string, dt: dateTime)
proc set(tbl: string, A: [?D] shared Toml?)  where D.isAssociative()
proc set(tbl: string, arr: [?dom] shared Toml?)  where !dom.isAssociative()
override proc serialize(writer, ref serializer) throws

Write a Table to channel f in TOML format

proc writeTOML(f)

Write a Table to channel f in TOML format

proc writeJSON(f)

Write a Table to channel f in JSON format

proc toString() : string

For the user to write values of a node as follows: Toml[key].toString()

proc tomlType : string throws

Return Toml type as a string.

Valid types include:

  • empty

  • string

  • integer

  • float

  • boolean

  • datetime

  • array

  • toml (inline table)