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

Function tok_take_array

ccan/ccan/cdump/cdump.c:323–338  ·  view source on GitHub ↗

[ ... */

Source from the content-addressed store, hash-verified

321
322/* [ ... */
323static bool tok_take_array(struct parse_state *ps, struct cdump_type **type)
324{
325 /* This will be some arbitrary expression! */
326 struct cdump_type *arr = get_type(ps->defs, CDUMP_ARRAY, NULL);
327
328 arr->u.arr.size = tok_take_expr_str(arr, ps, "]");
329 if (!arr->u.arr.size) {
330 complain(ps, "Could not find closing array size ]");
331 return false;
332 }
333
334 arr->u.arr.type = *type;
335 *type = arr;
336
337 return true;
338}
339
340static struct cdump_type *ptr_of(struct parse_state *ps,
341 const struct cdump_type *ptr_to)

Callers 1

tok_take_conglomFunction · 0.85

Calls 3

get_typeFunction · 0.85
tok_take_expr_strFunction · 0.85
complainFunction · 0.85

Tested by

no test coverage detected