jm / toml

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

Are curly brackets a correct and supported syntax? #45

Open StanBright opened 8 years ago

StanBright commented 8 years ago

Hi,

I'm wondering whether hashes are part of the correct syntax, or they have been misused in this example?

[dependencies]
libc = "0.2.10"
pnet = "0.8.1"
mysql = { version = "2.2.1", default-features = false, features = ["socket"] }

Ref: https://raw.githubusercontent.com/AgilData/gibbs-mysql-spyglass/master/Cargo.toml

Trying to parse this file fails with the following errors:

Failed to match sequence (ALL_SPACE (TABLE / TABLE_ARRAY / KEY_VALUE / COMMENT_LINE){0, } ALL_SPACE) at line 9 char 1.
`- Don't know what to do with "mysql = { " at line 9 char 1.
ravinggenius commented 8 years ago

Looks like this was added in TOML 0.4.0, which this library doesn't support.

Edit: Just use tomlrb. It is much more up to date and seems to be actively maintained.