aboutsummaryrefslogtreecommitdiff
path: root/src/yuescript/yue_compiler.cpp
diff options
context:
space:
mode:
authorLi Jin <dragon-fly@qq.com>2021-04-19 20:56:05 +0800
committerLi Jin <dragon-fly@qq.com>2021-04-19 20:56:05 +0800
commitea82666506b57d6e905b7f2e5fe78498fe5a7abd (patch)
treeef5eb47f849090f225567b67070a90aeeee49d95 /src/yuescript/yue_compiler.cpp
parent7ac784e73b026ce7e17babb2f0b819864fd898b0 (diff)
downloadyuescript-ea82666506b57d6e905b7f2e5fe78498fe5a7abd.tar.gz
yuescript-ea82666506b57d6e905b7f2e5fe78498fe5a7abd.tar.bz2
yuescript-ea82666506b57d6e905b7f2e5fe78498fe5a7abd.zip
fix issue #49 and issue #50.
Diffstat (limited to '')
-rw-r--r--src/yuescript/yue_compiler.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/yuescript/yue_compiler.cpp b/src/yuescript/yue_compiler.cpp
index 85744d5..bc55eb3 100644
--- a/src/yuescript/yue_compiler.cpp
+++ b/src/yuescript/yue_compiler.cpp
@@ -59,7 +59,7 @@ inline std::string s(std::string_view sv) {
59 return std::string(sv); 59 return std::string(sv);
60} 60}
61 61
62const std::string_view version = "0.7.7"sv; 62const std::string_view version = "0.7.8"sv;
63const std::string_view extension = "yue"sv; 63const std::string_view extension = "yue"sv;
64 64
65class YueCompilerImpl { 65class YueCompilerImpl {
@@ -4111,7 +4111,7 @@ private:
4111 transformExp(star_exp->value, temp, ExpUsage::Closure); 4111 transformExp(star_exp->value, temp, ExpUsage::Closure);
4112 if (newListVal) _buf << indent() << "local "sv << listVar << " = "sv << temp.back() << nll(nameList); 4112 if (newListVal) _buf << indent() << "local "sv << listVar << " = "sv << temp.back() << nll(nameList);
4113 _buf << indent() << "for "sv << indexVar << " = 1, #"sv << listVar << " do"sv << nlr(loopTarget); 4113 _buf << indent() << "for "sv << indexVar << " = 1, #"sv << listVar << " do"sv << nlr(loopTarget);
4114 _buf << indent(1) << "local "sv << join(vars) << " = "sv << listVar << "["sv << indexVar << "]"sv << nll(nameList); 4114 _buf << indent(1) << "local "sv << join(vars, ", "sv) << " = "sv << listVar << "["sv << indexVar << "]"sv << nll(nameList);
4115 out.push_back(clearBuf()); 4115 out.push_back(clearBuf());
4116 } 4116 }
4117 break; 4117 break;