diff options
Diffstat (limited to '')
-rw-r--r-- | src/yuescript/yue_compiler.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/yuescript/yue_compiler.cpp b/src/yuescript/yue_compiler.cpp index b7e09d3..c29513e 100644 --- a/src/yuescript/yue_compiler.cpp +++ b/src/yuescript/yue_compiler.cpp | |||
@@ -75,7 +75,7 @@ static std::unordered_set<std::string> Metamethods = { | |||
75 | "close"s // Lua 5.4 | 75 | "close"s // Lua 5.4 |
76 | }; | 76 | }; |
77 | 77 | ||
78 | const std::string_view version = "0.25.4"sv; | 78 | const std::string_view version = "0.25.5"sv; |
79 | const std::string_view extension = "yue"sv; | 79 | const std::string_view extension = "yue"sv; |
80 | 80 | ||
81 | class CompileError : public std::logic_error { | 81 | class CompileError : public std::logic_error { |
@@ -9174,7 +9174,7 @@ private: | |||
9174 | transformIf(ifNode, temp, ExpUsage::Common); | 9174 | transformIf(ifNode, temp, ExpUsage::Common); |
9175 | } else { | 9175 | } else { |
9176 | bool transformed = false; | 9176 | bool transformed = false; |
9177 | if (assignList || returnValue) { | 9177 | if (!extraScope && assignList) { |
9178 | if (auto block = with->body.as<Block_t>()) { | 9178 | if (auto block = with->body.as<Block_t>()) { |
9179 | if (!block->statements.empty()) { | 9179 | if (!block->statements.empty()) { |
9180 | Statement_t* stmt = static_cast<Statement_t*>(block->statements.back()); | 9180 | Statement_t* stmt = static_cast<Statement_t*>(block->statements.back()); |
@@ -9199,7 +9199,6 @@ private: | |||
9199 | auto doNode = stmt->new_ptr<Do_t>(); | 9199 | auto doNode = stmt->new_ptr<Do_t>(); |
9200 | doNode->body.set(newBody); | 9200 | doNode->body.set(newBody); |
9201 | transformDo(doNode, temp, ExpUsage::Common); | 9201 | transformDo(doNode, temp, ExpUsage::Common); |
9202 | temp.back().insert(0, indent()); | ||
9203 | transformed = true; | 9202 | transformed = true; |
9204 | } | 9203 | } |
9205 | } | 9204 | } |