tom
A (not quite complete) pure Gleam TOML parser!
gleam add tom
import tom
const config = "
name = \"tom\"
version = \"0.1.0\"
"
pub fn main() {
let assert Ok(parsed) = tom.parse(config)
// Now do stuff with your data!
}
Further documentation can be found at https://hexdocs.pm/tom.
Status
- Bare key
- Double quoted key
- Single quoted key
- Multi-segment key
- Mixed multi-segment key
- Table
- Array of tables
- String
- Multi-line string
- String \b escape sequence
- String \t escape sequence
- String \n escape sequence
- String \f escape sequence
- String \r escape sequence
- String \e escape sequence
- String " escape sequence
- String \ escape sequence
- String \xHH escape sequence
- String \uHHHH escape sequence
- String \UHHHHHHHH escape sequence
- Positive number operator
- Negative number operator
- Decimal integer
- Decimal integer with underscores
- Hex integer
- Octal integer
- Binary integer
- Float
- Float with exponent
- Boolean
- Offset Date-Time
- Local Date-Time
- Local Date
- Local Time
- Array
- Inline Table