diff options
author | Li Jin <dragon-fly@qq.com> | 2022-09-08 18:04:50 +0800 |
---|---|---|
committer | Li Jin <dragon-fly@qq.com> | 2022-09-08 18:04:50 +0800 |
commit | 27b7211e74d5677fbf5c5212264d32c7bfaffc20 (patch) | |
tree | 7031464c3a2a5d977ffa7ae26481a7280d8f8ece /src | |
parent | 269b1fbf5d4d2c9ad33e75fb000d388b8391cb0f (diff) | |
download | yuescript-27b7211e74d5677fbf5c5212264d32c7bfaffc20.tar.gz yuescript-27b7211e74d5677fbf5c5212264d32c7bfaffc20.tar.bz2 yuescript-27b7211e74d5677fbf5c5212264d32c7bfaffc20.zip |
added a missing scope.
Diffstat (limited to 'src')
-rwxr-xr-x | src/yuescript/yue_compiler.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/yuescript/yue_compiler.cpp b/src/yuescript/yue_compiler.cpp index 73b4ae9..9a9e2d6 100755 --- a/src/yuescript/yue_compiler.cpp +++ b/src/yuescript/yue_compiler.cpp | |||
@@ -59,7 +59,7 @@ namespace yue { | |||
59 | 59 | ||
60 | typedef std::list<std::string> str_list; | 60 | typedef std::list<std::string> str_list; |
61 | 61 | ||
62 | const std::string_view version = "0.15.1"sv; | 62 | const std::string_view version = "0.15.2"sv; |
63 | const std::string_view extension = "yue"sv; | 63 | const std::string_view extension = "yue"sv; |
64 | 64 | ||
65 | class YueCompilerImpl { | 65 | class YueCompilerImpl { |
@@ -1856,6 +1856,11 @@ private: | |||
1856 | } | 1856 | } |
1857 | } | 1857 | } |
1858 | if (destruct.inlineAssignment) { | 1858 | if (destruct.inlineAssignment) { |
1859 | if (!extraScope) { | ||
1860 | extraScope = true; | ||
1861 | temp.push_back(indent() + "do"s + nll(x)); | ||
1862 | pushScope(); | ||
1863 | } | ||
1859 | transformAssignment(destruct.inlineAssignment, temp); | 1864 | transformAssignment(destruct.inlineAssignment, temp); |
1860 | } | 1865 | } |
1861 | if (optionalDestruct) { | 1866 | if (optionalDestruct) { |