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

Added a Julia implementation #168

Merged
merged 1 commit into from
Mar 8, 2013
Merged

Added a Julia implementation #168

merged 1 commit into from
Mar 8, 2013

Conversation

pygy
Copy link
Contributor

@pygy pygy commented Mar 4, 2013

It is AFAICT conforming, in that it correctly parses every valid sample I threw at it, and chokes on the rest, but I didn't formally test it.

It is AFAICT conforming, in that it correctly parses every valid sample I threw at it, and chokes on the rest, but I didn't formally test it.
@pygy
Copy link
Contributor Author

pygy commented Mar 6, 2013

It now passes all the tests in BurntSushi's toml-test (except the ones for type homogenous arrays which are not yet part of the spec).

@BurntSushi
Copy link
Member

@pygy That's great to hear! I hope you found it useful :-)

Although there aren't any tests in toml-test for anticipated features. Only tests for my understanding of the spec. In particular, TOML has homogeneous arrays right now:

Arrays are square brackets with other primitives inside. Whitespace is ignored. Elements are separated by commas. No, you can't mix data types, that's stupid.

However, TOML's current definition of the type of an array is just array. If #154 is accepted, then the type of an array changes to array of TOML-TYPE. The tests in toml-test just make sure that arrays like this aren't allowed:

arrays-and-ints =  [1, ["Arrays are not integers."]]
ints-and-floats = [1, 1.0]
strings-and-ints = ["hi", 42]

But that arrays like this are allowed:

mixed = [[1, 2], ["a", "b"], [1.0, 2.0]]

@pygy
Copy link
Contributor Author

pygy commented Mar 6, 2013

Indeed, you are right.

I'll change that.

Edit: Done.

mojombo pushed a commit that referenced this pull request Mar 8, 2013
Added a Julia implementation
@mojombo mojombo merged commit 0ba3fef into toml-lang:master Mar 8, 2013
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

Successfully merging this pull request may close these issues.

3 participants