Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parsing fails on empty multiline arrays #21

Open
strcrzy opened this issue Sep 13, 2013 · 1 comment
Open

parsing fails on empty multiline arrays #21

strcrzy opened this issue Sep 13, 2013 · 1 comment

Comments

@strcrzy
Copy link

strcrzy commented Sep 13, 2013

hi, i'm writing an example/default config with comments in toml, and it seems to choke your parser. i'm using toml 0.0.4.

[example]
  empty_array = [] # works
  empty_multi_line_array = [
           # fails
  ]

The exception i get is:

Failed to match sequence (ALL_SPACE (KEY_GROUP / KEY_VALUE / COMMENT_LINE){0, } ALL_SPACE) at line 2 char 3.
`- Extra input after last repetition at line 2 char 3.
   `- Failed to match [ \t\r\n] at line 2 char 3.

i believe it is valid TOML, per the spec:
"Arrays can also be multiline. So in addition to ignoring whitespace, arrays also ignore newlines between the brackets. Terminating commas are ok before the closing bracket."

i'm interested in digging into the parser/grammar myself and making a PR, but before I did I just wanted to make sure this was a valid issue and that you would be interested in a fix

@dirk
Copy link
Collaborator

dirk commented Oct 19, 2013

I'm unable to reproduce with this gem at git @bd0b566333f1caad2f62ae57057be8f0707c1856. This may be a bug in version 0.0.4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants