diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/yuescript/yue_compiler.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/yuescript/yue_compiler.cpp b/src/yuescript/yue_compiler.cpp index e3c9d31..a2a1864 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.27.2"sv; | 78 | const std::string_view version = "0.27.3"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 { |
@@ -4795,8 +4795,8 @@ private: | |||
4795 | auto varName = variableToString(ast_to<Variable_t>(var)); | 4795 | auto varName = variableToString(ast_to<Variable_t>(var)); |
4796 | auto closeVar = getUnusedName("_close_"sv); | 4796 | auto closeVar = getUnusedName("_close_"sv); |
4797 | addToScope(closeVar); | 4797 | addToScope(closeVar); |
4798 | getCloses.push_back(closeVar + "=assert "s + varName + ".<close>"s); | 4798 | getCloses.push_back(closeVar + "=if type("s + varName + ") in ['table', 'userdata'] then assert "s + varName + ".<> and "s + varName +".<close>, \""s + "variable '"s + varName + "' got a non-closable value\" elseif "s + varName + " == nil then nil else error \""s + "variable '"s + varName + "' got a non-closable value\""); |
4799 | doCloses.push_front(closeVar + ' ' + varName); | 4799 | doCloses.push_front(closeVar + "? "s + varName); |
4800 | } | 4800 | } |
4801 | popScope(); | 4801 | popScope(); |
4802 | auto okVar = getUnusedName("_ok_"sv); | 4802 | auto okVar = getUnusedName("_ok_"sv); |