mirror of
https://github.com/open-simh/simtools.git
synced 2026-01-13 15:27:18 +00:00
Slightly improve expression tree debug output.
This commit is contained in:
parent
36db00dc79
commit
855c1ca321
7
extree.c
7
extree.c
@ -120,6 +120,10 @@ void print_tree(
|
||||
print_tree(printfile, tp->data.child.right, depth + 4);
|
||||
fputc('>', printfile);
|
||||
break;
|
||||
|
||||
default:
|
||||
fprintf(printfile, "(node %d)", tp->type);
|
||||
break;
|
||||
}
|
||||
|
||||
if (depth == 0)
|
||||
@ -762,7 +766,8 @@ EX_TREE *evaluate(
|
||||
break;
|
||||
|
||||
default:
|
||||
fprintf(stderr, "Invalid tree\n");
|
||||
fprintf(stderr, "evaluate_rec: Invalid tree: ");
|
||||
print_tree(stderr, tp, 0);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user