bungcip / better-toml

toml extension for vs code editor
74 stars 13 forks source link

Support for non-decimal integers #12

Open cheshirex opened 6 years ago

cheshirex commented 6 years ago

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 commented 6 years ago

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

rasky commented 5 years ago

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

toothbrush7777777 commented 5 years ago

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

toothbrush7777777 commented 5 years ago

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 commented 5 years ago

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

bungcip commented 5 years ago

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

toothbrush7777777 commented 5 years ago

@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 commented 4 years ago

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