diff options
| author | Li Jin <dragon-fly@qq.com> | 2026-02-06 10:30:49 +0800 |
|---|---|---|
| committer | Li Jin <dragon-fly@qq.com> | 2026-02-06 10:30:49 +0800 |
| commit | aa3ecc7badfb39cb9167fb95c9a678257c1d9954 (patch) | |
| tree | a309d9af64ae060e2086c8bcdcf943693c8dcbba /src | |
| parent | 03902475c542c3ec4f1884c4217f8a4ef61f3ca8 (diff) | |
| download | yuescript-aa3ecc7badfb39cb9167fb95c9a678257c1d9954.tar.gz yuescript-aa3ecc7badfb39cb9167fb95c9a678257c1d9954.tar.bz2 yuescript-aa3ecc7badfb39cb9167fb95c9a678257c1d9954.zip | |
Fixed docs.
Diffstat (limited to 'src')
| -rw-r--r-- | src/yuescript/yue_compiler.cpp | 2 | ||||
| -rw-r--r-- | src/yuescript/yue_parser.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
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<std::string> Metamethods = { | |||
| 78 | "close"s // Lua 5.4 | 78 | "close"s // Lua 5.4 |
| 79 | }; | 79 | }; |
| 80 | 80 | ||
| 81 | const std::string_view version = "0.32.8"sv; | 81 | const std::string_view version = "0.32.9"sv; |
| 82 | const std::string_view extension = "yue"sv; | 82 | const std::string_view extension = "yue"sv; |
| 83 | 83 | ||
| 84 | class CompileError : public std::logic_error { | 84 | 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() { | |||
| 1149 | check_indent >> comment_line >> and_(stop) | | 1149 | check_indent >> comment_line >> and_(stop) | |
| 1150 | advance >> ensure(comment_line, pop_indent) >> and_(stop); | 1150 | advance >> ensure(comment_line, pop_indent) >> and_(stop); |
| 1151 | 1151 | ||
| 1152 | EmptyLine = plain_space >> and_(stop); | 1152 | EmptyLine = +(*set(" \t") >> line_break); |
| 1153 | 1153 | ||
| 1154 | indentation_error = pl::user(not_(pipe_operator | eof()), [](const item_t& item) { | 1154 | indentation_error = pl::user(not_(pipe_operator | eof()), [](const item_t& item) { |
| 1155 | RaiseError("unexpected indent"sv, item); | 1155 | RaiseError("unexpected indent"sv, item); |
| @@ -1161,7 +1161,7 @@ YueParser::YueParser() { | |||
| 1161 | return st->lax; | 1161 | return st->lax; |
| 1162 | }); | 1162 | }); |
| 1163 | 1163 | ||
| 1164 | line = *(EmptyLine >> line_break) >> ( | 1164 | line = -EmptyLine >> ( |
| 1165 | check_indent_match >> space >> Statement >> *(';' >> space >> (Statement | not_(';'))) | | 1165 | check_indent_match >> space >> Statement >> *(';' >> space >> (Statement | not_(';'))) | |
| 1166 | YueComment | | 1166 | YueComment | |
| 1167 | advance_match >> ensure(space >> (indentation_error | Statement), pop_indent) | 1167 | advance_match >> ensure(space >> (indentation_error | Statement), pop_indent) |
