toml
TOML configuration parser. Read sections and keys from TOML files in the Cargo/Rust style.
Install
ppm install toml
Usage Example
uses toml;
var cfg := LoadFile('app.toml');
var name := Get(cfg, 'package', 'name');
var version := Get(cfg, 'package', 'version');
var port := Get(cfg, 'server', 'port');
WriteLn(name + ' v' + version);
WriteLn('Port: ' + port);
// Parse inline
var doc := Parse('[db]' + #10 + 'url = "postgres://localhost/mydb"');
var dbURL := Get(doc, 'db', 'url');
Features
Sections/tables ([section])
String, integer, boolean values
Inline tables support
Comment support (#)
File loading with LoadFile()