aboutsummaryrefslogtreecommitdiff
path: root/interpreter/print.c
diff options
context:
space:
mode:
authorCamil Staps2016-09-24 14:12:05 +0200
committerCamil Staps2016-09-24 14:12:05 +0200
commit4981e0caf24b3906200e4af12593f4e10a17c699 (patch)
treeab24637a480c5a1c3147b8a2dc9d63d8b90fe566 /interpreter/print.c
parentFix format strings (diff)
Fix issue with overwritten references
Diffstat (limited to 'interpreter/print.c')
-rw-r--r--interpreter/print.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/interpreter/print.c b/interpreter/print.c
index 3f39b13..d2c03ae 100644
--- a/interpreter/print.c
+++ b/interpreter/print.c
@@ -214,6 +214,14 @@ void print_node_to_file(struct node* node, FILE* f, struct visited_nodes *visite
(uintptr_t) node, (uintptr_t) node->var2, node->used_count);
}
break;
+
+ case NODE_REDIRECT:
+ fprintf(f, "%" PRIuPTR " [label=\"%p: Redirection (%d)\", penwidth=%d];\n",
+ (uintptr_t) node, node, node->used_count, node->used_count);
+ print_node_to_file((struct node*) node->var1, f, visited);
+ fprintf(f, "%" PRIuPTR " -> %" PRIuPTR " [label=\"l\", penwidth=%d];\n",
+ (uintptr_t) node, (uintptr_t) node->var1, node->used_count);
+ break;
}
if (close) {