| 32 | } |
| 33 | |
| 34 | std::string require_scalar_value(yaml_document_t & document, int index, const std::string & context) { |
| 35 | const yaml_node_t & node = require_node(document, index, context); |
| 36 | if (node.type != YAML_SCALAR_NODE) { |
| 37 | throw std::runtime_error("yaml " + context + " must be a scalar"); |
| 38 | } |
| 39 | return std::string(reinterpret_cast<const char *>(node.data.scalar.value), node.data.scalar.length); |
| 40 | } |
| 41 | |
| 42 | std::string join_path(std::string_view prefix, std::string_view key) { |
| 43 | if (prefix.empty()) { |
no test coverage detected