jm / toml

Parse TOML. Like a bawss.
MIT License
151 stars 37 forks source link

Failed to parse numbers with underscores #46

Closed ivanovaleksey closed 7 years ago

ivanovaleksey commented 7 years ago

Hi.

It is said here that

For large numbers, you may use underscores to enhance readability

but it seems to be broken.

content = <<-TOML
foo = 10_000_000
TOML
parser = TOML::Parser.new(content).parsed

Failed to match sequence (ALL_SPACE (TABLE / TABLE_ARRAY / KEY_VALUE / COMMENT_LINE){0, } ALL_SPACE) at line 1 char 1.
`- Don't know what to do with "foo = 10_0" at line 1 char 1.

Is it parslet related issue?

mhmoudgmal commented 7 years ago

@ivanovaleksey now it is supported. :)

ivanovaleksey commented 7 years ago

@mhmoudgmal nicely done! Can I close the issue?

mhmoudgmal commented 7 years ago

@ivanovaleksey Yes, I think so.