summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorMartin Atkins <mart@degeneration.co.uk>2018-12-13 17:22:41 -0800
committerMartin Atkins <mart@degeneration.co.uk>2018-12-13 17:22:41 -0800
commite8dbb16dbc7f9774afd808c19a0fd40d2347191f (patch)
tree7825ccbf8433dfc1fe1a4270a3c928d73156e45a /cmd
parentc33bbe4c25d0d5655a860f1ebca0ad5baf43d75c (diff)
hcl/hclsyntax: Fix up parsing of flush heredocs
This was implemented a long time ago in the original template parser, but it was missed in the rewrite of the template parser to make it use a two-stage parsing strategy. It's implemented as a post-processing step on the result of the first stage of parsing, which produces a flat sequence of literal strings, interpolation markers, and control markers, and prior to the second stage which matches opening and closing control markers to produce an expression AST. It's important to do this at parse time rather than eval time since it is the static layout of the source code that decides the indentation level, and so an interpolation marker at the start of a line that itself produces spaces does not affect the result.
Diffstat (limited to 'cmd')
0 files changed, 0 insertions, 0 deletions