flyx / NimYAML

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

Fix for newer versions of compiler. #46

Closed jaccarmac closed 7 years ago

jaccarmac commented 7 years ago

61720e0df9475af647de171f6b2964c36234961a in the Nim compiler introduced the bug in this project. In brief, the upstream change flattens nnkStmtLists of one item. Thus, quote do: followed by one statement is no longer a nnkStmtList but whatever that one statement is. This breaks several macro implementations where a quote do: form is initialized and then appended to. Based on Araq's feedback (https://irclogs.nim-lang.org/02-10-2017.html#21:01:26), these single-statement quotes are now converted into one-element statement lists as necessary (behavior on old versions of the compiler is maintained).

flyx commented 7 years ago

thanks!