diff options
author | Li Jin <dragon-fly@qq.com> | 2022-07-14 14:35:58 +0800 |
---|---|---|
committer | Li Jin <dragon-fly@qq.com> | 2022-07-14 14:35:58 +0800 |
commit | f4147d5fea31438cfee3dc3781806a1a0b6c40c9 (patch) | |
tree | 407fc1db7fa5a40ee0e07b78c6f731e284e67237 /src | |
parent | c6946ca162911036a19cc7c5deadb6d8c127755e (diff) | |
download | yuescript-f4147d5fea31438cfee3dc3781806a1a0b6c40c9.tar.gz yuescript-f4147d5fea31438cfee3dc3781806a1a0b6c40c9.tar.bz2 yuescript-f4147d5fea31438cfee3dc3781806a1a0b6c40c9.zip |
fix a case when doing optional destructuring for metatable.
Diffstat (limited to 'src')
-rwxr-xr-x | src/yuescript/yue_compiler.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/yuescript/yue_compiler.cpp b/src/yuescript/yue_compiler.cpp index 2565878..21764fe 100755 --- a/src/yuescript/yue_compiler.cpp +++ b/src/yuescript/yue_compiler.cpp | |||
@@ -56,7 +56,7 @@ using namespace parserlib; | |||
56 | 56 | ||
57 | typedef std::list<std::string> str_list; | 57 | typedef std::list<std::string> str_list; |
58 | 58 | ||
59 | const std::string_view version = "0.13.4"sv; | 59 | const std::string_view version = "0.13.5"sv; |
60 | const std::string_view extension = "yue"sv; | 60 | const std::string_view extension = "yue"sv; |
61 | 61 | ||
62 | class YueCompilerImpl { | 62 | class YueCompilerImpl { |
@@ -2012,7 +2012,7 @@ private: | |||
2012 | pairs.push_back({ | 2012 | pairs.push_back({ |
2013 | p.target, | 2013 | p.target, |
2014 | p.targetVar, | 2014 | p.targetVar, |
2015 | ".#"s + sep + p.structure, | 2015 | ".#"s + (p.structure.empty() ? Empty : sep + p.structure), |
2016 | p.defVal | 2016 | p.defVal |
2017 | }); | 2017 | }); |
2018 | } | 2018 | } |