aboutsummaryrefslogtreecommitdiff
path: root/src/ast.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ast.c')
-rw-r--r--src/ast.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ast.c b/src/ast.c
index 3eaaf61..f75e531 100644
--- a/src/ast.c
+++ b/src/ast.c
@@ -129,6 +129,12 @@ static void do_print_ast(Node *node, int depth)
for (int i = 0; i < node->block.num_children; i++) {
do_print_ast(node->block.children[i], depth);
}
+ } else if (node->type == OP_DEREF) {
+ printf("DEREF\n");
+ do_print_ast(node->unary_expr, depth + 1);
+ } else if (node->type == OP_ADDROF) {
+ printf("ADDROF\n");
+ do_print_ast(node->unary_expr, depth + 1);
} else if (node->type == AST_BLOCK) {
printf("{\n");
for (int i = 0; i < node->block.num_children; i++) {