diff options
author | Li Jin <dragon-fly@qq.com> | 2022-04-20 09:19:59 +0800 |
---|---|---|
committer | Li Jin <dragon-fly@qq.com> | 2022-04-20 09:19:59 +0800 |
commit | 53bd5a32e30493f4915e79bfb63b1eec846f1a7f (patch) | |
tree | c8a3378538518e3eacd9bc6c8fda924012d644d3 /src | |
parent | ba1081a851dd6b3c76be5ad8bb9cb7fd643fc792 (diff) | |
download | yuescript-53bd5a32e30493f4915e79bfb63b1eec846f1a7f.tar.gz yuescript-53bd5a32e30493f4915e79bfb63b1eec846f1a7f.tar.bz2 yuescript-53bd5a32e30493f4915e79bfb63b1eec846f1a7f.zip |
add placeholder support for list destructuring. fix part of issue #93.
Diffstat (limited to 'src')
-rwxr-xr-x | src/yuescript/yue_compiler.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/yuescript/yue_compiler.cpp b/src/yuescript/yue_compiler.cpp index e7da2dd..17fbaf6 100755 --- a/src/yuescript/yue_compiler.cpp +++ b/src/yuescript/yue_compiler.cpp | |||
@@ -60,7 +60,7 @@ using namespace parserlib; | |||
60 | 60 | ||
61 | typedef std::list<std::string> str_list; | 61 | typedef std::list<std::string> str_list; |
62 | 62 | ||
63 | const std::string_view version = "0.10.11"sv; | 63 | const std::string_view version = "0.10.12"sv; |
64 | const std::string_view extension = "yue"sv; | 64 | const std::string_view extension = "yue"sv; |
65 | 65 | ||
66 | class YueCompilerImpl { | 66 | class YueCompilerImpl { |
@@ -1597,6 +1597,7 @@ private: | |||
1597 | _config.lintGlobalVariable = false; | 1597 | _config.lintGlobalVariable = false; |
1598 | auto exp = static_cast<Exp_t*>(pair); | 1598 | auto exp = static_cast<Exp_t*>(pair); |
1599 | auto varName = singleVariableFrom(exp); | 1599 | auto varName = singleVariableFrom(exp); |
1600 | if (varName == "_"sv) break; | ||
1600 | bool isVariable = !varName.empty(); | 1601 | bool isVariable = !varName.empty(); |
1601 | if (!isVariable) { | 1602 | if (!isVariable) { |
1602 | str_list temp; | 1603 | str_list temp; |