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

Function parse_keyword

ccan/ccan/graphql/graphql.c:77–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75/* The following functions construct the "leaves" of the abstract syntax tree. */
76
77RET parse_keyword(PARAMS, const char *keyword, const char *errmsg) {
78 struct graphql_token *tok = list_top(tokens, struct graphql_token, node);
79 if (!tok || tok->token_type != 'a') {
80 *err = errmsg; return NULL;
81 }
82 if (!streq(tok->token_string, keyword)) {
83 *err = errmsg; return NULL;
84 }
85 CONSUME_ONE;
86 return tok;
87}
88
89// Note: a static buffer is used here.
90RET parse_punct(PARAMS, int punct) {

Callers 5

parse_null_valueFunction · 0.85
parse_boolean_valueFunction · 0.85
parse_type_conditionFunction · 0.85
parse_operation_typeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected