From 672f497c3a80c0e46e33437ed6962ffb9dcfc398 Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Thu, 26 Sep 2019 13:06:22 +0200 Subject: [PATCH] Config lexer: complain on EOF in heredocs, i.e. {{{abc --- lib/config/config_lexer.ll | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/config/config_lexer.ll b/lib/config/config_lexer.ll index 71f1b96c7..fcf603411 100644 --- a/lib/config/config_lexer.ll +++ b/lib/config/config_lexer.ll @@ -115,6 +115,10 @@ do { \ BEGIN(HEREDOC); } +<> { + BOOST_THROW_EXCEPTION(ScriptError("End-of-file while in string literal", DebugInfoRange(yyextra->m_LocationBegin, *yylloc))); + } + \}\}\} { BEGIN(INITIAL);