From c45131d029d500e4ad5bcb42d1d1ccdd5727a094 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98yvind?= Date: Sat, 12 Mar 2022 19:26:50 +0100 Subject: [PATCH] print out what relation is used --- exercises/04/vslc/src/tree.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/exercises/04/vslc/src/tree.c b/exercises/04/vslc/src/tree.c index 4ef10bf..03dd7ed 100644 --- a/exercises/04/vslc/src/tree.c +++ b/exercises/04/vslc/src/tree.c @@ -85,9 +85,10 @@ tree_print(node_t* root, stem head) return; } printf("─%s", node_string[root->type]); - if ( root->type == IDENTIFIER_DATA || - root->type == STRING_DATA || - root->type == EXPRESSION ) + if ( root->type == IDENTIFIER_DATA || + root->type == STRING_DATA || + root->type == EXPRESSION || + root->type == RELATION) printf("(%s)", (char *) root->data); else if (root->type == NUMBER_DATA) printf("(%ld)", *((int64_t *)root->data));