MCPcopy Create free account
hub / github.com/cel-expr/cel-cpp / GetString

Function GetString

env/env_yaml.cc:91–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

89}
90
91std::string GetString(absl::string_view yaml, const YAML::Node& node) {
92 if (!node.IsDefined() || !node.IsScalar()) {
93 return "";
94 }
95 try {
96 return node.as<std::string>();
97 } catch (YAML::Exception& e) {
98 // This should never happen since we already checked that the node is a
99 // scalar and all scalars can be converted to strings.
100 return "";
101 }
102}
103
104bool IsBinary(const YAML::Node& node) {
105 return node.Tag() == "!!binary" || node.Tag() == "tag:yaml.org,2002:binary";

Callers 15

GetBinaryFunction · 0.85
ParseNameFunction · 0.85
ParseContainerConfigFunction · 0.85
ParseExtensionConfigsFunction · 0.85
ParseMacroListFunction · 0.85
ParseFunctionListFunction · 0.85
ParseTypeInfoFunction · 0.85
ParseVariableConfigsFunction · 0.85
ParseFunctionConfigsFunction · 0.85
GetMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected