diff options
author | Li Jin <dragon-fly@qq.com> | 2022-06-12 00:20:46 +0800 |
---|---|---|
committer | Li Jin <dragon-fly@qq.com> | 2022-06-12 00:20:46 +0800 |
commit | ce9338c540ac3397f3d15c442033a618d12c5105 (patch) | |
tree | 793096677c10a1c5d0d8dac77e6e61a651c77043 /src | |
parent | 1fa4049fc55986af8615ea836a60ac8cae255ad6 (diff) | |
download | yuescript-ce9338c540ac3397f3d15c442033a618d12c5105.tar.gz yuescript-ce9338c540ac3397f3d15c442033a618d12c5105.tar.bz2 yuescript-ce9338c540ac3397f3d15c442033a618d12c5105.zip |
remove some invalid codes.
Diffstat (limited to 'src')
-rwxr-xr-x | src/yuescript/yue_compiler.cpp | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/src/yuescript/yue_compiler.cpp b/src/yuescript/yue_compiler.cpp index 8535b43..3a4ef8c 100755 --- a/src/yuescript/yue_compiler.cpp +++ b/src/yuescript/yue_compiler.cpp | |||
@@ -1281,13 +1281,6 @@ private: | |||
1281 | temp.push_back(clearBuf()); | 1281 | temp.push_back(clearBuf()); |
1282 | } else if (ast_is<table_appending_op_t>(chainValue->items.back())) { | 1282 | } else if (ast_is<table_appending_op_t>(chainValue->items.back())) { |
1283 | chainValue->items.pop_back(); | 1283 | chainValue->items.pop_back(); |
1284 | if (chainValue->items.empty()) { | ||
1285 | if (_withVars.empty()) { | ||
1286 | throw std::logic_error(_info.errorMessage("short table appending must be called within a with block"sv, x)); | ||
1287 | } else { | ||
1288 | chainValue->items.push_back(toAst<Callable_t>(_withVars.top(), chainValue)); | ||
1289 | } | ||
1290 | } | ||
1291 | auto varName = singleVariableFrom(chainValue); | 1284 | auto varName = singleVariableFrom(chainValue); |
1292 | bool isScoped = false; | 1285 | bool isScoped = false; |
1293 | if (varName.empty() || !isLocal(varName)) { | 1286 | if (varName.empty() || !isLocal(varName)) { |