diff options
author | Li Jin <dragon-fly@qq.com> | 2022-07-25 09:56:21 +0800 |
---|---|---|
committer | Li Jin <dragon-fly@qq.com> | 2022-07-25 09:56:21 +0800 |
commit | 74b22e543819a1c6b3ab4fe30b57f6f045db0e8a (patch) | |
tree | a5f26f1aa946f5aaad6e9cf8bb5f9e97f71cae7d | |
parent | 303834e1b1e6cd9cae64b66c2ae44dcd7185238f (diff) | |
download | yuescript-74b22e543819a1c6b3ab4fe30b57f6f045db0e8a.tar.gz yuescript-74b22e543819a1c6b3ab4fe30b57f6f045db0e8a.tar.bz2 yuescript-74b22e543819a1c6b3ab4fe30b57f6f045db0e8a.zip |
cleanup.
-rwxr-xr-x | src/yuescript/yue_compiler.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/yuescript/yue_compiler.cpp b/src/yuescript/yue_compiler.cpp index 0d027a0..cc8bf79 100755 --- a/src/yuescript/yue_compiler.cpp +++ b/src/yuescript/yue_compiler.cpp | |||
@@ -7458,7 +7458,7 @@ private: | |||
7458 | } | 7458 | } |
7459 | } else { | 7459 | } else { |
7460 | if (localAttrib->attrib.is<close_attrib_t>()) { | 7460 | if (localAttrib->attrib.is<close_attrib_t>()) { |
7461 | throw std::logic_error(_info.errorMessage("close attribute is not available when not targeting Lua 5.4 or higher version"sv, x)); | 7461 | throw std::logic_error(_info.errorMessage("close attribute is not available when not targeting Lua version 5.4 or higher"sv, x)); |
7462 | } | 7462 | } |
7463 | for (auto& var : vars) { | 7463 | for (auto& var : vars) { |
7464 | markVarConst(var); | 7464 | markVarConst(var); |
@@ -7499,14 +7499,14 @@ private: | |||
7499 | 7499 | ||
7500 | void transformLabel(Label_t* label, str_list& out) { | 7500 | void transformLabel(Label_t* label, str_list& out) { |
7501 | if (getLuaTarget(label) < 502) { | 7501 | if (getLuaTarget(label) < 502) { |
7502 | throw std::logic_error(_info.errorMessage("label statement is not available when not targeting Lua 5.2 or higher version"sv, label)); | 7502 | throw std::logic_error(_info.errorMessage("label statement is not available when not targeting Lua version 5.2 or higher"sv, label)); |
7503 | } | 7503 | } |
7504 | out.push_back(indent() + "::"s + _parser.toString(label->label) + "::"s + nll(label)); | 7504 | out.push_back(indent() + "::"s + _parser.toString(label->label) + "::"s + nll(label)); |
7505 | } | 7505 | } |
7506 | 7506 | ||
7507 | void transformGoto(Goto_t* gotoNode, str_list& out) { | 7507 | void transformGoto(Goto_t* gotoNode, str_list& out) { |
7508 | if (getLuaTarget(gotoNode) < 502) { | 7508 | if (getLuaTarget(gotoNode) < 502) { |
7509 | throw std::logic_error(_info.errorMessage("goto statement is not available when not targeting Lua 5.2 or higher version"sv, gotoNode)); | 7509 | throw std::logic_error(_info.errorMessage("goto statement is not available when not targeting Lua version 5.2 or higher"sv, gotoNode)); |
7510 | } | 7510 | } |
7511 | out.push_back(indent() + "goto "s + _parser.toString(gotoNode->label) + nll(gotoNode)); | 7511 | out.push_back(indent() + "goto "s + _parser.toString(gotoNode->label) + nll(gotoNode)); |
7512 | } | 7512 | } |