| 214 | } |
| 215 | |
| 216 | absl::StatusOr<absl::flat_hash_set<std::string>> ParseMacroList( |
| 217 | absl::string_view yaml, const YAML::Node& standard_library, |
| 218 | absl::string_view key) { |
| 219 | absl::flat_hash_set<std::string> macro_set; |
| 220 | const YAML::Node macros = standard_library[std::string(key)]; |
| 221 | if (!macros.IsDefined()) { |
| 222 | return macro_set; |
| 223 | } |
| 224 | if (!macros.IsSequence()) { |
| 225 | return YamlError(yaml, macros, |
| 226 | absl::StrCat("Node '", key, "' is not a sequence")); |
| 227 | } |
| 228 | for (const YAML::Node& macro : macros) { |
| 229 | if (!macro.IsScalar()) { |
| 230 | return YamlError(yaml, macro, |
| 231 | absl::StrCat("Entry in '", key, "' is not a string")); |
| 232 | } |
| 233 | macro_set.insert(GetString(yaml, macro)); |
| 234 | } |
| 235 | return macro_set; |
| 236 | } |
| 237 | |
| 238 | absl::StatusOr<absl::flat_hash_set<std::pair<std::string, std::string>>> |
| 239 | ParseFunctionList(absl::string_view yaml, const YAML::Node& standard_library, |
no test coverage detected