MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / require_scalar_value

Function require_scalar_value

src/framework/io/yaml.cpp:34–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32}
33
34std::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
42std::string join_path(std::string_view prefix, std::string_view key) {
43 if (prefix.empty()) {

Callers 3

flatten_nodeFunction · 0.85
parse_scalar_mappingFunction · 0.85
parse_flattened_documentFunction · 0.85

Calls 1

stringFunction · 0.50

Tested by

no test coverage detected