diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-12-08 02:08:47 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-12-08 02:09:52 -0500 |
| commit | 5a194a3e0dc01d7ba0d9ad81030284ebda13cbd6 (patch) | |
| tree | 61c7419612cafe56f25f37b1718c57f716980048 /src/ast.h | |
| parent | 86228917b98a3ef4019e9e18fcafacc948ffcfd1 (diff) | |
Add checks for unused variables
Diffstat (limited to 'src/ast.h')
| -rw-r--r-- | src/ast.h | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -488,6 +488,7 @@ void visit_topologically(ast_list_t *ast, Closure_t fn); CONSTFUNC bool is_update_assignment(ast_t *ast); CONSTFUNC ast_e binop_tag(ast_e tag); CONSTFUNC bool is_binary_operation(ast_t *ast); -void ast_visit(ast_t *ast, void (*visitor)(ast_t *, void *), void *userdata); -void type_ast_visit(ast_t *ast, void (*visitor)(type_ast_t *, void *), void *userdata); +typedef enum { VISIT_STOP, VISIT_PROCEED } visit_behavior_t; +void ast_visit(ast_t *ast, visit_behavior_t (*visitor)(ast_t *, void *), void *userdata); +void type_ast_visit(ast_t *ast, visit_behavior_t (*visitor)(type_ast_t *, void *), void *userdata); OptionalText_t ast_metadata(ast_t *ast, const char *key); |
