aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/yuescript/yue_parser.cpp4
1 files changed, 3 insertions, 1 deletions
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
1130 if (it != _rules.end()) { 1130 if (it != _rules.end()) {
1131 return parse(codes, *it->second, lax); 1131 return parse(codes, *it->second, lax);
1132 } 1132 }
1133 return {.error = ParseInfo::Error{"invalid rule: "s + std::string{astName}, 1, 1}}; 1133 ParseInfo info{};
1134 info.error = ParseInfo::Error{"invalid rule: "s + std::string{astName}, 1, 1};
1135 return info;
1134} 1136}
1135 1137
1136bool YueParser::match(std::string_view astName, std::string_view codes) { 1138bool YueParser::match(std::string_view astName, std::string_view codes) {