From 68499e8060e6fadbf478528b390a8e9168896d4c Mon Sep 17 00:00:00 2001 From: Li Jin Date: Fri, 23 Apr 2021 08:56:10 +0800 Subject: cleanup. --- src/yuescript/yue_compiler.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/yuescript/yue_compiler.cpp b/src/yuescript/yue_compiler.cpp index bc55eb3..1cc5284 100644 --- a/src/yuescript/yue_compiler.cpp +++ b/src/yuescript/yue_compiler.cpp @@ -3639,7 +3639,7 @@ private: info = _parser.parse(codes); if (!info.node) { info.error = info.error.substr(info.error.find(':') + 2); - throw std::logic_error(_info.errorMessage(s("failed to expanded macro as block: "sv) + info.error, x)); + throw std::logic_error(_info.errorMessage(s("failed to expand macro as block: "sv) + info.error, x)); } } else { info = _parser.parse(codes); @@ -3647,12 +3647,12 @@ private: info = _parser.parse(codes); if (!info.node) { info.error = info.error.substr(info.error.find(':') + 2); - throw std::logic_error(_info.errorMessage(s("failed to expanded macro as expr or block: "sv) + info.error, x)); + throw std::logic_error(_info.errorMessage(s("failed to expand macro as expr or block: "sv) + info.error, x)); } isBlock = true; } else if (!info.node) { info.error = info.error.substr(info.error.find(':') + 2); - throw std::logic_error(_info.errorMessage(s("failed to expanded macro as expr: "sv) + info.error, x)); + throw std::logic_error(_info.errorMessage(s("failed to expand macro as expr: "sv) + info.error, x)); } } int line = x->m_begin.m_line; @@ -3715,7 +3715,7 @@ private: } return {info.node, std::move(info.codes), Empty, std::move(localVars)}; } else { - if (!isBlock) throw std::logic_error(_info.errorMessage(s("failed to expanded empty macro as expr"sv), x)); + if (!isBlock) throw std::logic_error(_info.errorMessage(s("failed to expand empty macro as expr"sv), x)); return {x->new_ptr().get(), std::move(info.codes), Empty, std::move(localVars)}; } } -- cgit v1.2.3-55-g6feb