validate that an identifier is bound
| 461 | |
| 462 | // validate that an identifier is bound |
| 463 | static VISITOR_STRATEGY _Validate_identifier |
| 464 | ( |
| 465 | const cypher_astnode_t *n, // ast-node (identifier) |
| 466 | bool start, // first traversal |
| 467 | ast_visitor *visitor // visitor |
| 468 | ) { |
| 469 | validations_ctx *vctx = AST_Visitor_GetContext(visitor); |
| 470 | |
| 471 | if(!start || vctx->ignore_identifiers) { |
| 472 | return VISITOR_CONTINUE; |
| 473 | } |
| 474 | |
| 475 | const char *identifier = cypher_ast_identifier_get_name(n); |
| 476 | if(_Validate_referred_identifier(vctx->defined_identifiers, identifier) == AST_INVALID) { |
| 477 | return VISITOR_BREAK; |
| 478 | } |
| 479 | |
| 480 | return VISITOR_RECURSE; |
| 481 | } |
| 482 | |
| 483 | // validate the values of a map |
| 484 | static VISITOR_STRATEGY _Validate_map |
nothing calls this directly
no test coverage detected