validate an apply operator
| 581 | |
| 582 | // validate an apply operator |
| 583 | static VISITOR_STRATEGY _Validate_apply_operator |
| 584 | ( |
| 585 | const cypher_astnode_t *n, // ast-node |
| 586 | bool start, // first traversal |
| 587 | ast_visitor *visitor // visitor |
| 588 | ) { |
| 589 | validations_ctx *vctx = AST_Visitor_GetContext(visitor); |
| 590 | if(!start) { |
| 591 | return VISITOR_CONTINUE; |
| 592 | } |
| 593 | |
| 594 | // Collect the function name. |
| 595 | const cypher_astnode_t *func = cypher_ast_apply_operator_get_func_name(n); |
| 596 | const char *func_name = cypher_ast_function_name_get_value(func); |
| 597 | if(_ValidateFunctionCall(func_name, (vctx->clause == CYPHER_AST_WITH || |
| 598 | vctx->clause == CYPHER_AST_RETURN)) == AST_INVALID) { |
| 599 | return VISITOR_BREAK; |
| 600 | } |
| 601 | |
| 602 | return VISITOR_RECURSE; |
| 603 | } |
| 604 | |
| 605 | // validate reduce |
| 606 | static VISITOR_STRATEGY _Validate_reduce |
nothing calls this directly
no test coverage detected