moleike / haskell-jsonnet

🎏 Haskell implementation of Jsonnet
https://hackage.haskell.org/package/jsonnet
Other
21 stars 6 forks source link

Parse escape characters in string literals #7

Closed moleike closed 4 years ago

moleike commented 4 years ago

The parsing of strings in its current form is very incomplete.

A Jsonnet string is very much like a JSON string, but with some additional flexibility: string literals use " or '. Either can be used to avoid escaping the other, e.g. "Farmer's Gin" instead of 'Farmer\'s Gin'.

As a first step, we should handle:

Ref: https://tools.ietf.org/html/rfc8259#section-7

If any doubts, please ask!

moleike commented 4 years ago

solved in 7e3d3e4574efd4c354c3b2b342752738e62bfb72