From 98be64dd52df92f7fdd40bae225c279db1676cab Mon Sep 17 00:00:00 2001 From: Li Jin Date: Tue, 3 Jun 2025 01:29:18 +0800 Subject: Kept backward compatibility for YueScript with C++17. --- src/yuescript/yue_parser.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/yuescript/yue_parser.cpp b/src/yuescript/yue_parser.cpp index 07c1120..e860d55 100644 --- a/src/yuescript/yue_parser.cpp +++ b/src/yuescript/yue_parser.cpp @@ -1130,7 +1130,9 @@ ParseInfo YueParser::parse(std::string_view astName, std::string_view codes, boo if (it != _rules.end()) { return parse(codes, *it->second, lax); } - return {.error = ParseInfo::Error{"invalid rule: "s + std::string{astName}, 1, 1}}; + ParseInfo info{}; + info.error = ParseInfo::Error{"invalid rule: "s + std::string{astName}, 1, 1}; + return info; } bool YueParser::match(std::string_view astName, std::string_view codes) { -- cgit v1.2.3-55-g6feb