Skip to content
This repository has been archived by the owner on Apr 13, 2022. It is now read-only.

Support for non-decimal integers #12

Open
cheshirex opened this issue Feb 26, 2018 · 8 comments
Open

Support for non-decimal integers #12

cheshirex opened this issue Feb 26, 2018 · 8 comments

Comments

@cheshirex
Copy link

It's not yet in a formal release, but the TOML master spec allows hexadecimal, octal, and binary integer values. I'm using hex in my project, but better-toml is marking that as an error.

Thanks!

@bungcip
Copy link
Owner

bungcip commented Feb 26, 2018

better-toml currently using toml-node to parse the file. I will wait until they release a new version which support hexadecimal.

@rasky
Copy link

rasky commented Nov 13, 2018

Any news? The new TOML spec has been stabilized and released.

@toothbrush7777777
Copy link

TOML v0.5 has support for hexadecimal, octal and binary numbers. Would it be difficult to change the TOML parser?

@toothbrush7777777
Copy link

toothbrush7777777 commented May 24, 2019

How about @iarna/toml? It appears to have all the features you are currently using and has rather comprehensive tests. I could submit a pull request if you'd like.

@bungcip
Copy link
Owner

bungcip commented May 25, 2019

thanks @toothbrush7777777 for the information, I will check @iana/toml, its appear to have better error message too.

@bungcip
Copy link
Owner

bungcip commented May 25, 2019

I also found @ltd/j-toml which support TOML 0.5

@toothbrush7777777
Copy link

toothbrush7777777 commented May 25, 2019

@bungcip Yes, I also found that one. It appears to be even faster than @iana/toml but apparently doesn't support valid TOML files like this:

[a.b.c]
y = ""
[a]
z = ""

@djc
Copy link

djc commented Jan 20, 2020

Ping? I see hex being used by cargo deny, but now VS Code highlights some of the configuration as bad.

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

No branches or pull requests

5 participants