kowainik / tomland

🏝 Bidirectional TOML serialization
https://kowainik.github.io/posts/2019-01-14-tomland
Mozilla Public License 2.0
120 stars 39 forks source link

Leading zero #344

Closed dariodsa closed 3 years ago

dariodsa commented 3 years ago

According to the issue [#333], tomland has problem with parsing the numbers with leading zero. That problem is some sort of connected with #147 because parser should consume data and throw an error without recovering. That feature is now implemented thanks to the observing function. So if number has leading zero, an error will be thrown, otherwise normal more parser will be called. It took me some time to figure it out, so any advice how to make this approach better would be appreciated. Dario