TomlParser

Usage

use 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

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] unmanaged Toml)
proc init(dt: datetime)
proc init(i: int)
proc init(boo: bool)
proc init(re: real)
proc init(arr: [?dom] unmanaged Toml)
proc init(root: unmanaged Toml)
proc this(tbl: string) ref: unmanaged Toml throws

Returns the index of the table path given as a parameter

override proc writeThis(f)

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)