kalta / etoml Goto Github PK
View Code? Open in Web Editor NEWTOML language erlang parser
License: ISC License
TOML language erlang parser
License: ISC License
There can be three cases where duplicate keys appear:
Kind 2. is not handled intuitively, using {duplicate_key. _}
error:
1> etoml:parse("[a]\n b = 1\n b = 1\n").
{error,{duplicated_key,<<"b">>}}
2> etoml:parse("[a.b]\n c = 1\n [a]\n b = 1\n").
{error,{duplicated_key,<<"b">>}}
3> etoml:parse("[a]\n b = 1\n [a.b]\n c = 1\n").
** exception error: bad argument
in function lists:keymember/3
called as lists:keymember(<<"c">>,1,1)
in call from etoml:join/3 (src/etoml.erl, line 97)
in call from etoml:join/3 (src/etoml.erl, line 104)
in call from etoml:join/2 (src/etoml.erl, line 92)
in call from etoml:parse/1 (src/etoml.erl, line 60)
Hello!
First of all, thanks for all the contributors for this project.
Now let me bug you guys a little bit.
Does etoml supports parsing arrays of tables?
I have the following TOML:
# this is a toml file
id = "this_is_my_test"
directory = "test_scripts/"
results = "results/"
[[step]]
info = "foo"
[step.web]
script = "simuterm.js"
params = ["foo", "bar", "baz"]
[[step]]
info = "bar"
[step.web]
script = "cat.js"
params = ["can", "haz", "cheese"]
And I tried parsing it with etoml (I'm using it in a Elixir project) like:
iex> File.read!(~S(path/to/file)) |> :etoml.parse
and it gave me {:error, {:invalid_key, 9}}
.
Well, 9 points to the first line of the toml where a array of tables is specified, so I'm guessing... parsing array of tables is not supported?
Thanks in advance!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.