From 53bd5a32e30493f4915e79bfb63b1eec846f1a7f Mon Sep 17 00:00:00 2001 From: Li Jin Date: Wed, 20 Apr 2022 09:19:59 +0800 Subject: add placeholder support for list destructuring. fix part of issue #93. --- src/yuescript/yue_compiler.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') 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; typedef std::list str_list; -const std::string_view version = "0.10.11"sv; +const std::string_view version = "0.10.12"sv; const std::string_view extension = "yue"sv; class YueCompilerImpl { @@ -1597,6 +1597,7 @@ private: _config.lintGlobalVariable = false; auto exp = static_cast(pair); auto varName = singleVariableFrom(exp); + if (varName == "_"sv) break; bool isVariable = !varName.empty(); if (!isVariable) { str_list temp; -- cgit v1.2.3-55-g6feb