aboutsummaryrefslogtreecommitdiff
path: root/src/MoonP/moon_compiler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/MoonP/moon_compiler.cpp')
-rw-r--r--src/MoonP/moon_compiler.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/MoonP/moon_compiler.cpp b/src/MoonP/moon_compiler.cpp
index 80ab5a9..c9d9c78 100644
--- a/src/MoonP/moon_compiler.cpp
+++ b/src/MoonP/moon_compiler.cpp
@@ -43,7 +43,7 @@ inline std::string s(std::string_view sv) {
43} 43}
44 44
45const std::string_view version() { 45const std::string_view version() {
46 return "0.3.9"sv; 46 return "0.3.10"sv;
47} 47}
48 48
49// name of table stored in lua registry 49// name of table stored in lua registry
@@ -4364,7 +4364,12 @@ private:
4364 auto assignment = x->new_ptr<ExpListAssign_t>(); 4364 auto assignment = x->new_ptr<ExpListAssign_t>();
4365 assignment->expList.set(expList); 4365 assignment->expList.set(expList);
4366 auto assign = x->new_ptr<Assign_t>(); 4366 auto assign = x->new_ptr<Assign_t>();
4367 assign->values.dup(values->valueList->exprs); 4367 if (auto expListLow = values->valueList.as<ExpListLow_t>()) {
4368 assign->values.dup(expListLow->exprs);
4369 } else {
4370 auto tableBlock = values->valueList.to<TableBlock_t>();
4371 assign->values.push_back(tableBlock);
4372 }
4368 assignment->action.set(assign); 4373 assignment->action.set(assign);
4369 transformAssignment(assignment, out); 4374 transformAssignment(assignment, out);
4370 } else { 4375 } else {
@@ -4993,7 +4998,12 @@ private:
4993 auto assignment = x->new_ptr<ExpListAssign_t>(); 4998 auto assignment = x->new_ptr<ExpListAssign_t>();
4994 assignment->expList.set(expList); 4999 assignment->expList.set(expList);
4995 auto assign = x->new_ptr<Assign_t>(); 5000 auto assign = x->new_ptr<Assign_t>();
4996 assign->values.dup(values->valueList->exprs); 5001 if (auto expListLow = values->valueList.as<ExpListLow_t>()) {
5002 assign->values.dup(expListLow->exprs);
5003 } else {
5004 auto tableBlock = values->valueList.to<TableBlock_t>();
5005 assign->values.push_back(tableBlock);
5006 }
4997 assignment->action.set(assign); 5007 assignment->action.set(assign);
4998 transformAssignment(assignment, temp); 5008 transformAssignment(assignment, temp);
4999 } 5009 }