make sure an identifier is bound
| 323 | |
| 324 | // make sure an identifier is bound |
| 325 | static AST_Validation _Validate_referred_identifier |
| 326 | ( |
| 327 | rax *defined_identifiers, // bound variables |
| 328 | const char *identifier // identifier to check |
| 329 | ) { |
| 330 | int len = strlen(identifier); |
| 331 | if(raxFind(defined_identifiers, (unsigned char *)identifier, len) == raxNotFound) { |
| 332 | ErrorCtx_SetError("'%.*s' not defined", len, identifier); |
| 333 | return AST_INVALID; |
| 334 | } |
| 335 | |
| 336 | return AST_VALID; |
| 337 | } |
| 338 | |
| 339 | // validate a list comprehension |
| 340 | static VISITOR_STRATEGY _Validate_list_comprehension |
no test coverage detected