From a6dc9009035113858acac32cd083983c42bc9de6 Mon Sep 17 00:00:00 2001 From: Li Jin Date: Mon, 11 Dec 2023 09:40:29 +0800 Subject: fix empty block ends with eof issue. --- src/yuescript/yue_parser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/yuescript/yue_parser.cpp b/src/yuescript/yue_parser.cpp index 5b97a25..4b865f5 100644 --- a/src/yuescript/yue_parser.cpp +++ b/src/yuescript/yue_parser.cpp @@ -958,7 +958,7 @@ YueParser::YueParser() { check_indent >> (multi_line_comment >> space | comment) | advance >> ensure(multi_line_comment >> space | comment, pop_indent) | plain_space - ) >> and_(line_break); + ) >> and_(stop); indentation_error = pl::user(not_(pipe_operator | eof()), [](const item_t& item) { throw ParserError("unexpected indent"sv, item.begin); -- cgit v1.2.3-55-g6feb