MCPcopy Create free account
hub / github.com/ElementsProject/lightning / parse_guide

Function parse_guide

common/json_parse.c:278–300  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

276 va_list *ap);
277
278static const char *parse_guide(const char *buffer,
279 const jsmntok_t *tok,
280 const char **guide,
281 va_list *ap)
282{
283 const char *errmsg;
284
285 if (**guide == '{') {
286 errmsg = parse_obj(buffer, tok, guide, ap);
287 if (errmsg)
288 return errmsg;
289 } else if (**guide == '[') {
290 errmsg = parse_arr(buffer, tok, guide, ap);
291 if (errmsg)
292 return errmsg;
293 } else {
294 guide_must_be(guide, '%');
295 errmsg = handle_percent(buffer, tok, ap);
296 if (errmsg)
297 return errmsg;
298 }
299 return NULL;
300}
301
302static const char *parse_fieldval(const char *buffer,
303 const jsmntok_t *tok,

Callers 1

json_scanvFunction · 0.85

Calls 4

parse_objFunction · 0.85
parse_arrFunction · 0.85
guide_must_beFunction · 0.85
handle_percentFunction · 0.85

Tested by

no test coverage detected