kubkon / zig-yaml

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

Support unquoted strings, single-quoted strings, and double-quoted strings with relevant escapes #2

Closed eric-p-hutchins closed 3 years ago

eric-p-hutchins commented 3 years ago

Took a stab at implementing single and double-quoted strings with a start of supported escapes being handled correctly.

This approach keeps the escapes within the "literal" token and relies on the parser to handle the escapes. Alternatively, we could add "escape sequence" tokens. Maybe we could still do that in the future.

What do you think? @kubkon

eric-p-hutchins commented 3 years ago

@kubkon I made all suggested changes and improved some of the naming. There are still some issues but I think it is a little nicer than before.

kubkon commented 3 years ago

Looks great, thanks @eric-p-hutchins! The only thing to resolve now are rebase conflicts, which got me baffled a little since I didn't push anything to master at all recently. Could you have a look on your end? Perhaps you've rebased against an older commit or something? Could you rebase onto latest master and push again?

Nvm, we can still merge commit.