aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLi Jin <dragon-fly@qq.com>2026-01-22 15:03:12 +0800
committerLi Jin <dragon-fly@qq.com>2026-01-22 15:03:12 +0800
commitf1454bbbd13a71da2005ff789cde2da0e9eb81f6 (patch)
tree37131187f4218dd3ebec049101c28a161e7ca289 /src
parent604a8e5e53cdc7391a502fcabf07e8f1cc2a778c (diff)
downloadyuescript-f1454bbbd13a71da2005ff789cde2da0e9eb81f6.tar.gz
yuescript-f1454bbbd13a71da2005ff789cde2da0e9eb81f6.tar.bz2
yuescript-f1454bbbd13a71da2005ff789cde2da0e9eb81f6.zip
Adding tests.HEADmain
Diffstat (limited to 'src')
-rw-r--r--src/yue.cpp4
-rw-r--r--src/yuescript/yue_compiler.cpp10
2 files changed, 7 insertions, 7 deletions
diff --git a/src/yue.cpp b/src/yue.cpp
index 26f581e..7e39367 100644
--- a/src/yue.cpp
+++ b/src/yue.cpp
@@ -57,8 +57,8 @@ std::future<R> async(const std::function<R()>& f) {
57#else 57#else
58template<class R> 58template<class R>
59std::future<R> async(const std::function<R()>& f) { 59std::future<R> async(const std::function<R()>& f) {
60 // fallback: ignore stack size 60 // fallback: ignore stack size
61 return std::async(std::launch::async, f); 61 return std::async(std::launch::async, f);
62} 62}
63#endif 63#endif
64 64
diff --git a/src/yuescript/yue_compiler.cpp b/src/yuescript/yue_compiler.cpp
index c4fc952..2ed0265 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.3"sv; 81const std::string_view version = "0.32.4"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 {
@@ -10872,13 +10872,13 @@ private:
10872 } 10872 }
10873 BLOCK_END 10873 BLOCK_END
10874 if (wrapped) { 10874 if (wrapped) {
10875 auto expList = x->new_ptr<ExpList_t>(); 10875 auto expList = tryFunc->new_ptr<ExpList_t>();
10876 expList->exprs.push_back(tryFunc); 10876 expList->exprs.push_back(tryFunc);
10877 auto expListAssign = x->new_ptr<ExpListAssign_t>(); 10877 auto expListAssign = tryFunc->new_ptr<ExpListAssign_t>();
10878 expListAssign->expList.set(expList); 10878 expListAssign->expList.set(expList);
10879 auto stmt = x->new_ptr<Statement_t>(); 10879 auto stmt = tryFunc->new_ptr<Statement_t>();
10880 stmt->content.set(expListAssign); 10880 stmt->content.set(expListAssign);
10881 auto block = x->new_ptr<Block_t>(); 10881 auto block = tryFunc->new_ptr<Block_t>();
10882 block->statementOrComments.push_back(stmt); 10882 block->statementOrComments.push_back(stmt);
10883 tryFunc.set(block); 10883 tryFunc.set(block);
10884 } 10884 }