@@ -20,6 +20,7 @@ library_manifest library_manifest::load_from_file(const fs::path& fpath) { | |||
lm::read_accumulate("Uses", uses_strings), | |||
lm::read_accumulate("Links", links_strings), | |||
lm::read_required("Name", ret.name), | |||
lm::ignore_x_keys(), | |||
lm::reject_unknown()); | |||
extend(ret.uses, ranges::views::transform(uses_strings, lm::split_usage_string)); |
@@ -255,6 +255,13 @@ public: | |||
} | |||
}; | |||
class ignore_x_keys { | |||
public: | |||
bool operator()(std::string_view, std::string_view key, std::string_view) const { | |||
return key.find("X-") == 0; | |||
} | |||
}; | |||
class reject_unknown { | |||
public: | |||
int operator()(std::string_view context, std::string_view key, std::string_view) const { |