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

Error: Flow sequence contains an unexpected , #7

Closed
ikatyang opened this issue May 30, 2018 · 1 comment
Closed

Error: Flow sequence contains an unexpected , #7

ikatyang opened this issue May 30, 2018 · 1 comment

Comments

@ikatyang
Copy link
Contributor

ikatyang commented May 30, 2018

version:
1.0.0-beta.6

input:

[ , ]
---
[ 123,, ]

output:

YAMLSyntaxError: Flow sequence contains an unexpected ,
YAMLSyntaxError: Flow sequence contains an unexpected ,

expected:

[ null ]
---
[ 123, null ]

P.S. There's no error for its flowMap version but its YAMLMap#items is also empty.

@ikatyang ikatyang changed the title YAMLSyntaxError: Flow sequence contains an unexpected , Error: Flow sequence contains an unexpected , May 30, 2018
@eemeli
Copy link
Owner

eemeli commented May 30, 2018

These errors are in fact being reported correctly.

The sequence spec allows for a single trailing comma as long as it's followed by at least one sequence entry, but multiple commas are not allowed at any point since a flow sequence entry can't be an empty string.

The error here is that the map equivalents don't report these errors like they should.

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