summaryrefslogtreecommitdiff
path: root/ext/typeexpr
diff options
context:
space:
mode:
authorMartin Atkins <mart@degeneration.co.uk>2018-03-08 08:22:32 -0800
committerMartin Atkins <mart@degeneration.co.uk>2018-03-08 08:22:32 -0800
commit7d6ed4d8f315f66b6c64389c00a661d16c4161ef (patch)
tree29804223a8b1d3e886a68ca30e4dfa9e2a92b611 /ext/typeexpr
parentbe66a72aa86d789b518ef778293624d56b5b633f (diff)
hclsyntax: emit Newline after a CHeredoc
Previously, due to how heredoc scanning was implemented, the closing marker for a heredoc would consume the newline that terminated it. This was problematic in any context that is newline-sensitive, because it would cause us to skip the TokenNewline that might terminate e.g. an attribute definition: foo = <<EOT hello EOT bar = "hello" Previously the "foo" attribute would fail to parse properly due to trying to consume the "bar" definition as part of its expression. Now we synthetically split the marker token into two parts: the marker itself and the newline that follows it. This means that using a heredoc in any context where newlines are sensitive will involuntarily introduce a newline, but that seems consistent with user expectation based on how heredocs seem to be used "in the wild".
Diffstat (limited to 'ext/typeexpr')
0 files changed, 0 insertions, 0 deletions