flyx / NimYAML

YAML implementation for Nim
https://nimyaml.org
Other
186 stars 36 forks source link

Adapt type hinting to Yaml 1.2.2 #132

Closed theamarin closed 1 year ago

theamarin commented 1 year ago

The regex's that were used for hinting were not aligned with the YAML 1.2.2 schema, see https://yaml.org/spec/1.2.2/#103-core-schema

Especially, leading zeros are no longer treated specially.

This commit updates the regex's used for integers and floats, update the state machine and adds some tests for the hinting.

theamarin commented 1 year ago

Your feedback is much appreciated, I'd be happy to have another review :blush:

flyx commented 1 year ago

Thanks!

Merged it and fixed a small problem in tjson.nim which broke because of the change to boolean type hints. Might be a good time to look up how to configure this repo to run the automated tests without my approval for PRs, so that people immediately see such problems.