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

Function parse_punct

ccan/ccan/graphql/graphql.c:90–102  ·  view source on GitHub ↗

Note: a static buffer is used here.

Source from the content-addressed store, hash-verified

88
89// Note: a static buffer is used here.
90RET parse_punct(PARAMS, int punct) {
91 static char punctbuf[16];
92 struct graphql_token *tok = list_top(tokens, struct graphql_token, node);
93 if (!tok || tok->token_type != punct) {
94 if (punct == PUNCT_SPREAD)
95 sprintf(punctbuf, "expected: '...'");
96 else
97 sprintf(punctbuf, "expected: '%c'", punct);
98 *err = punctbuf; return NULL;
99 }
100 CONSUME_ONE;
101 return tok;
102}
103
104RET parse_name(PARAMS) {
105 struct graphql_token *tok = list_top(tokens, struct graphql_token, node);

Callers 10

parse_variableFunction · 0.85
parse_list_valueFunction · 0.85
parse_object_valueFunction · 0.85
parse_default_valueFunction · 0.85
parse_argumentsFunction · 0.85
parse_directiveFunction · 0.85
parse_fragment_spreadFunction · 0.85
parse_inline_fragmentFunction · 0.85
parse_selection_setFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected