You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are some flaw on the library that are not following the TOML grammar rule. I have add some test from the TOML example and it's failed
# Bare keys may only contain ASCII letters, ASCII digits, underscores, and dashes (A-Za-z0-9_-). Note that bare keys are allowed to be composed of only ASCII digits, e.g. 1234, but are always interpreted as strings.
it_parses "123abc_- = 123", { "123abc_-" => 123 }
it_parses "-_123abc = 123", { "-_123abc" => 123 }
# Since v0.5.0
# Dotted keys are a sequence of bare or quoted keys joined with a dot. This allows for grouping similar properties together:
it_parses "physical.color = \"orange\"", { "physical" => { "color" => "orange" } }
it_parses "site.\"google.com\" = true", { "site" => { "google.com" => true } }
it_parses %(
[dog."tater.man"]
type.name = "pug"
),
{"dog" => {"tater" => {"man" => {"type" => {"name" => "pug"}}}} }
It appears that the lexer read 123abc_- as 2 token, 123 as a number and abc_
as a key. And for the -_123abc, because the key started with character -, the lexer then expect the token as a negative number. I'd like to make a pull request to fix this issue.
Can you give me some pointers to fix this? I'm thinking to recreate some parts of the lexer and parser.
The text was updated successfully, but these errors were encountered:
There are some flaw on the library that are not following the TOML grammar rule. I have add some test from the TOML example and it's failed
It appears that the lexer read
123abc_-
as 2 token,123
as a number andabc_
as a key. And for the
-_123abc
, because the key started with character-
, the lexer then expect the token as a negative number. I'd like to make a pull request to fix this issue.Can you give me some pointers to fix this? I'm thinking to recreate some parts of the lexer and parser.
The text was updated successfully, but these errors were encountered: