MCPcopy Create free account
hub / github.com/RedisGraph/RedisGraph / AST_ReferredFunctions

Function AST_ReferredFunctions

src/ast/ast.c:262–277  ·  view source on GitHub ↗

recursively collect the names of all function calls beneath a node

Source from the content-addressed store, hash-verified

260
261// recursively collect the names of all function calls beneath a node
262void AST_ReferredFunctions
263(
264 const cypher_astnode_t *root,
265 rax *referred_funcs
266) {
267 cypher_astnode_type_t root_type = cypher_astnode_type(root);
268 if(root_type == CYPHER_AST_APPLY_OPERATOR || root_type == CYPHER_AST_APPLY_ALL_OPERATOR) {
269 _consume_function_call_expression(root, referred_funcs);
270 } else {
271 uint child_count = cypher_astnode_nchildren(root);
272 for(int i = 0; i < child_count; i++) {
273 const cypher_astnode_t *child = cypher_astnode_get_child(root, i);
274 AST_ReferredFunctions(child, referred_funcs);
275 }
276 }
277}
278
279// retrieve the first instance of the specified clause in the AST segment if any
280const cypher_astnode_t *AST_GetClause

Callers 1

Calls 1

Tested by

no test coverage detected