tomlex v0.0.5 Tomlex.Parser

Parses a list of tokenized TOML lines into the corresponding map.

Summary

Functions

Parses a list of tokenized TOML lines into the corresponding map

Types

line_type()
line_type() :: Tomlex.LineTypes

Functions

parse(lines)
parse([line_type]) :: Map.t

Parses a list of tokenized TOML lines into the corresponding map.

Examples

iex> Tomlex.Parser.parse([%Tomlex.LineTypes.Integer{key: "key", value: "23"}])
%{key: 23}

iex> Tomlex.Parser.parse([%Tomlex.LineTypes.Table{keys: [:x, :y, :z]}])
%{x: %{y: %{z: %{}}}}