fix empty heredoc templates

This commit is contained in:
mhoffm
2021-06-27 15:54:15 +02:00
parent 6c5f3eba28
commit fd450bb5f6
3 changed files with 53 additions and 4 deletions

View File

@@ -21,7 +21,7 @@ foo = "${ var.bar }"
(identifier))))))))))
================================================================================
empty template
empty template interpolation
================================================================================
foo = "${}"
@@ -37,6 +37,48 @@ foo = "${}"
(quoted_template
(template_interpolation)))))))
================================================================================
empty heredoc template
================================================================================
foo = <<END
END
--------------------------------------------------------------------------------
(config_file
(body
(attribute
(identifier)
(expression
(template_expr
(heredoc_template
(heredoc_start)
(heredoc_identifier)
(heredoc_identifier)))))))
================================================================================
heredoc with fake ending
================================================================================
foo = <<END
END not!
END
--------------------------------------------------------------------------------
(config_file
(body
(attribute
(identifier)
(expression
(template_expr
(heredoc_template
(heredoc_start)
(heredoc_identifier)
(template_literal)
(heredoc_identifier)))))))
================================================================================
quoted template expression with escaped strings and fake strip marker
================================================================================