From aa3ecc7badfb39cb9167fb95c9a678257c1d9954 Mon Sep 17 00:00:00 2001 From: Li Jin Date: Fri, 6 Feb 2026 10:30:49 +0800 Subject: Fixed docs. --- src/yuescript/yue_compiler.cpp | 2 +- src/yuescript/yue_parser.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/yuescript/yue_compiler.cpp b/src/yuescript/yue_compiler.cpp index bcc44d2..eb31ab5 100644 --- a/src/yuescript/yue_compiler.cpp +++ b/src/yuescript/yue_compiler.cpp @@ -78,7 +78,7 @@ static std::unordered_set Metamethods = { "close"s // Lua 5.4 }; -const std::string_view version = "0.32.8"sv; +const std::string_view version = "0.32.9"sv; const std::string_view extension = "yue"sv; class CompileError : public std::logic_error { diff --git a/src/yuescript/yue_parser.cpp b/src/yuescript/yue_parser.cpp index 194d04d..3d8e315 100644 --- a/src/yuescript/yue_parser.cpp +++ b/src/yuescript/yue_parser.cpp @@ -1149,7 +1149,7 @@ YueParser::YueParser() { check_indent >> comment_line >> and_(stop) | advance >> ensure(comment_line, pop_indent) >> and_(stop); - EmptyLine = plain_space >> and_(stop); + EmptyLine = +(*set(" \t") >> line_break); indentation_error = pl::user(not_(pipe_operator | eof()), [](const item_t& item) { RaiseError("unexpected indent"sv, item); @@ -1161,7 +1161,7 @@ YueParser::YueParser() { return st->lax; }); - line = *(EmptyLine >> line_break) >> ( + line = -EmptyLine >> ( check_indent_match >> space >> Statement >> *(';' >> space >> (Statement | not_(';'))) | YueComment | advance_match >> ensure(space >> (indentation_error | Statement), pop_indent) -- cgit v1.2.3-55-g6feb