validate the values of a map
| 482 | |
| 483 | // validate the values of a map |
| 484 | static VISITOR_STRATEGY _Validate_map |
| 485 | ( |
| 486 | const cypher_astnode_t *n, // ast-node (map) |
| 487 | bool start, // first traversal |
| 488 | ast_visitor *visitor // visitor |
| 489 | ) { |
| 490 | validations_ctx *vctx = AST_Visitor_GetContext(visitor); |
| 491 | |
| 492 | // we enter ONLY when start=true, so no check is needed |
| 493 | |
| 494 | // traverse the entries of the map |
| 495 | uint nentries = cypher_ast_map_nentries(n); |
| 496 | for (uint i = 0; i < nentries; i++) { |
| 497 | const cypher_astnode_t *exp = cypher_ast_map_get_value(n, i); |
| 498 | AST_Visitor_visit(exp, visitor); |
| 499 | if(ErrorCtx_EncounteredError()) { |
| 500 | return VISITOR_BREAK; |
| 501 | } |
| 502 | } |
| 503 | |
| 504 | // do not traverse children |
| 505 | return VISITOR_CONTINUE; |
| 506 | } |
| 507 | |
| 508 | // validate a projection |
| 509 | static VISITOR_STRATEGY _Validate_projection |
nothing calls this directly
no test coverage detected