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

Comma not enforced for third+ array elements #112

Closed
jbeda opened this issue Feb 26, 2016 · 2 comments
Closed

Comma not enforced for third+ array elements #112

jbeda opened this issue Feb 26, 2016 · 2 comments
Labels

Comments

@jbeda
Copy link
Contributor

jbeda commented Feb 26, 2016

This works:

$ ./jsonnet -e '[1, 2 3]'
[
   1,
   2,
   3
]

I would expect to see an error.

We need to reset get_comma to false (and implement at test) in parseTerminal around here: https://github.com/google/jsonnet/blob/master/core/parser.cpp#L951.

@sparkprime
Copy link
Member

Heh, looks like I accidentally fixed this in my reformatter branch.

@sparkprime
Copy link
Member

Yeah there's code to reset it in the branch here
https://github.com/google/jsonnet/blob/fmt/core/parser.cpp#L582

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

No branches or pull requests

2 participants