aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLi Jin <dragon-fly@qq.com>2026-01-20 10:27:30 +0800
committerLi Jin <dragon-fly@qq.com>2026-01-20 10:27:30 +0800
commitc6229c02564024d8c02c2d438b2fc180ce4c6bcf (patch)
tree7760bcd6908995ed7a425fc10ad0eee96ebf2887
parent3fee6db80114e8a5c29f18ac57e7ea7c7459c91d (diff)
downloadyuescript-c6229c02564024d8c02c2d438b2fc180ce4c6bcf.tar.gz
yuescript-c6229c02564024d8c02c2d438b2fc180ce4c6bcf.tar.bz2
yuescript-c6229c02564024d8c02c2d438b2fc180ce4c6bcf.zip
Fixed a glitch.HEADv0.32.1main
-rw-r--r--spec/inputs/syntax.yue2
-rw-r--r--spec/outputs/syntax.lua8
-rw-r--r--src/yuescript/yue_compiler.cpp2
-rw-r--r--src/yuescript/yue_parser.cpp2
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; 539q = 1 --[[it's q]]; --[[got w]] w = 2; e = 3; print --[[param q]] q, w, e; --[[here]] -- line ends
540 540
541nil 541nil
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)
522end 518end
519local q = 1
520local w = 2
521local e = 3
522print(q, w, e)
523return nil 523return 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
81const std::string_view version = "0.32.0"sv; 81const std::string_view version = "0.32.1"sv;
82const std::string_view extension = "yue"sv; 82const std::string_view extension = "yue"sv;
83 83
84class CompileError : public std::logic_error { 84class 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 );