fork of https://github.com/hashicorp/hcl
because issue :
https://github.com/hashicorp/hcl/issues/290
these code permit use of "nested" field decoding which is just composite struct
18e45ec05c
This requires some extra state-keeping because we allow templates to be nested inside templates. This takes us outside of the world of regular languages, but we accept that here because it makes things easier to deal with down the line in the parser. The methodology is to keep track of how many braces are open at a given time and then, when a nested template interpolation begins, record the current brace level. Then, when a closing brace is encountered, if its nesting level is at the top of the stack then we pop off the stack and return to "main" parsing mode. Ragel's existing idea of calling and returning from machines is important here too. As this currently stands this is not actually needed, but once heredocs are in play we will have two possible places to return to at the end of an interpolation sequence, so the state return stack maintained by Ragel will determine whether to return to string mode or heredoc mode. |
||
---|---|---|
gozcl | ||
zcl | ||
zcled | ||
zclparse | ||
.travis.yml | ||
LICENSE |