kubkon / zig-yaml

YAML parser for Zig
MIT License
139 stars 37 forks source link

Allow commas in unquoted string + empty map #42

Open gwenzek opened 1 month ago

gwenzek commented 1 month ago

Hi Jakub, thanks for the lib.

I found two minor issues with the libraries:

From: https://yaml.org/spec/1.2.2/#733-plain-style inside flow collections, plain scalars must not contain the “[”, “]”, “{”, “}” and “,” characters. To handle this the tokenizer need to tracks if it's within a flow or not.

I can split the PR in two if you prefer, but also the two commits are easy to review independently.