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

Function parse_guide

common/json_parse.c:272–294  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

270 va_list *ap);
271
272static const char *parse_guide(const char *buffer,
273 const jsmntok_t *tok,
274 const char **guide,
275 va_list *ap)
276{
277 const char *errmsg;
278
279 if (**guide == '{') {
280 errmsg = parse_obj(buffer, tok, guide, ap);
281 if (errmsg)
282 return errmsg;
283 } else if (**guide == '[') {
284 errmsg = parse_arr(buffer, tok, guide, ap);
285 if (errmsg)
286 return errmsg;
287 } else {
288 guide_must_be(guide, '%');
289 errmsg = handle_percent(buffer, tok, ap);
290 if (errmsg)
291 return errmsg;
292 }
293 return NULL;
294}
295
296static const char *parse_fieldval(const char *buffer,
297 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