summaryrefslogtreecommitdiff
path: root/src/yuescript/yue_compiler.cpp
diff options
context:
space:
mode:
authorLi Jin <dragon-fly@qq.com>2021-11-02 11:17:58 +0800
committerLi Jin <dragon-fly@qq.com>2021-11-02 11:17:58 +0800
commit827c3736f357e09168fc108e8e740c6425d37d9b (patch)
tree259f977bf7f4ebe0e397fe5e1b74e7fbb1b75e8e /src/yuescript/yue_compiler.cpp
parentaed806476fe50899c0f01750175531ac41267b9d (diff)
downloadyuescript-827c3736f357e09168fc108e8e740c6425d37d9b.tar.gz
yuescript-827c3736f357e09168fc108e8e740c6425d37d9b.tar.bz2
yuescript-827c3736f357e09168fc108e8e740c6425d37d9b.zip
fix a wrong code generating issue, update builtin Lua.
Diffstat (limited to '')
-rwxr-xr-xsrc/yuescript/yue_compiler.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/yuescript/yue_compiler.cpp b/src/yuescript/yue_compiler.cpp
index 415fcd3..e004821 100755
--- a/src/yuescript/yue_compiler.cpp
+++ b/src/yuescript/yue_compiler.cpp
@@ -60,7 +60,7 @@ using namespace parserlib;
60 60
61typedef std::list<std::string> str_list; 61typedef std::list<std::string> str_list;
62 62
63const std::string_view version = "0.8.4"sv; 63const std::string_view version = "0.8.5"sv;
64const std::string_view extension = "yue"sv; 64const std::string_view extension = "yue"sv;
65 65
66class YueCompilerImpl { 66class YueCompilerImpl {
@@ -530,6 +530,7 @@ private:
530 } 530 }
531 if (!exp) return nullptr; 531 if (!exp) return nullptr;
532 BLOCK_START 532 BLOCK_START
533 BREAK_IF(exp->nilCoalesed);
533 BREAK_IF(!exp->opValues.empty()); 534 BREAK_IF(!exp->opValues.empty());
534 BREAK_IF(exp->pipeExprs.size() != 1); 535 BREAK_IF(exp->pipeExprs.size() != 1);
535 auto unary = static_cast<unary_exp_t*>(exp->pipeExprs.back()); 536 auto unary = static_cast<unary_exp_t*>(exp->pipeExprs.back());