MCPcopy Create free account
hub / github.com/Snapchat/Valdi / parseString

Function parseString

valdi_core/src/valdi_core/cpp/Schema/ValueSchemaParser.cpp:73–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71}
72
73static std::optional<StringBox> parseString(TextParser& parser) {
74 if (!parser.parse('\'')) {
75 return std::nullopt;
76 }
77
78 auto str = parser.readUntilCharacterAndParse('\'');
79
80 if (!str) {
81 return std::nullopt;
82 }
83
84 return StringCache::getGlobal().makeString(str.value());
85}
86
87static std::optional<ValueSchemaTypeReference> parseTypeReference(TextParser& parser) {
88 auto typeHint = ValueSchemaTypeReferenceTypeHintUnknown;

Callers 3

parseTypeReferenceFunction · 0.85
doParseClassSchemaFunction · 0.85
parseEnumSchemaFunction · 0.85

Calls 5

getGlobalFunction · 0.85
makeStringMethod · 0.80
valueMethod · 0.65
parseMethod · 0.45

Tested by

no test coverage detected