diff options
| author | Li Jin <dragon-fly@qq.com> | 2026-01-20 10:27:30 +0800 |
|---|---|---|
| committer | Li Jin <dragon-fly@qq.com> | 2026-01-20 10:27:30 +0800 |
| commit | c6229c02564024d8c02c2d438b2fc180ce4c6bcf (patch) | |
| tree | 7760bcd6908995ed7a425fc10ad0eee96ebf2887 | |
| parent | 3fee6db80114e8a5c29f18ac57e7ea7c7459c91d (diff) | |
| download | yuescript-0.32.1.tar.gz yuescript-0.32.1.tar.bz2 yuescript-0.32.1.zip | |
| -rw-r--r-- | spec/inputs/syntax.yue | 2 | ||||
| -rw-r--r-- | spec/outputs/syntax.lua | 8 | ||||
| -rw-r--r-- | src/yuescript/yue_compiler.cpp | 2 | ||||
| -rw-r--r-- | src/yuescript/yue_parser.cpp | 2 |
4 files changed, 7 insertions, 7 deletions
diff --git a/spec/inputs/syntax.yue b/spec/inputs/syntax.yue index 8904802..a63f629 100644 --- a/spec/inputs/syntax.yue +++ b/spec/inputs/syntax.yue | |||
| @@ -536,7 +536,7 @@ do | |||
| 536 | catch err | 536 | catch err |
| 537 | print "error:", err | 537 | print "error:", err |
| 538 | 538 | ||
| 539 | q = 1;; w = 2;;; e = 3; print q, w, e; | 539 | q = 1 --[[it's q]]; --[[got w]] w = 2; e = 3; print --[[param q]] q, w, e; --[[here]] -- line ends |
| 540 | 540 | ||
| 541 | nil | 541 | nil |
| 542 | 542 | ||
diff --git a/spec/outputs/syntax.lua b/spec/outputs/syntax.lua index 77ecba4..eb4543c 100644 --- a/spec/outputs/syntax.lua +++ b/spec/outputs/syntax.lua | |||
| @@ -515,9 +515,9 @@ do | |||
| 515 | end, function(err) | 515 | end, function(err) |
| 516 | return print("error:", err) | 516 | return print("error:", err) |
| 517 | end) | 517 | end) |
| 518 | local q = 1 | ||
| 519 | local w = 2 | ||
| 520 | local e = 3 | ||
| 521 | print(q, w, e) | ||
| 522 | end | 518 | end |
| 519 | local q = 1 | ||
| 520 | local w = 2 | ||
| 521 | local e = 3 | ||
| 522 | print(q, w, e) | ||
| 523 | return nil | 523 | return nil |
diff --git a/src/yuescript/yue_compiler.cpp b/src/yuescript/yue_compiler.cpp index c7802b6..f9b4f18 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.0"sv; | 81 | const std::string_view version = "0.32.1"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 b032826..f564f6a 100644 --- a/src/yuescript/yue_parser.cpp +++ b/src/yuescript/yue_parser.cpp | |||
| @@ -1164,7 +1164,7 @@ YueParser::YueParser() { | |||
| 1164 | }); | 1164 | }); |
| 1165 | 1165 | ||
| 1166 | line = *(EmptyLine >> line_break) >> ( | 1166 | line = *(EmptyLine >> line_break) >> ( |
| 1167 | check_indent_match >> space >> Statement >> *(';' >> -(space >> Statement)) | | 1167 | check_indent_match >> space >> Statement >> *(';' >> space >> (Statement | not_(';'))) | |
| 1168 | YueComment | | 1168 | YueComment | |
| 1169 | advance_match >> ensure(space >> (indentation_error | Statement), pop_indent) | 1169 | advance_match >> ensure(space >> (indentation_error | Statement), pop_indent) |
| 1170 | ); | 1170 | ); |
