aboutsummaryrefslogtreecommitdiff
path: root/src/ast.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ast.h')
-rw-r--r--src/ast.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ast.h b/src/ast.h
index 2e562514..29141490 100644
--- a/src/ast.h
+++ b/src/ast.h
@@ -91,6 +91,7 @@ typedef enum {
} type_ast_e;
typedef struct tag_ast_s {
+ file_t *file;
const char *start, *end;
const char *name;
arg_ast_t *fields;
@@ -503,3 +504,5 @@ 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);