Merge pull request #7541 from Icinga/bugfix/heredoc-eof

Config lexer: complain on EOF in heredocs, i.e. {{{abc<EOF>
This commit is contained in:
Michael Friedrich 2019-10-22 17:19:27 +02:00 committed by GitHub
commit 6103f53c5b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -115,6 +115,10 @@ do { \
BEGIN(HEREDOC);
}
<HEREDOC><<EOF>> {
BOOST_THROW_EXCEPTION(ScriptError("End-of-file while in string literal", DebugInfoRange(yyextra->m_LocationBegin, *yylloc)));
}
<HEREDOC>\}\}\} {
BEGIN(INITIAL);