- print_tree(t->pt.cond.left, ind+1);
- printf("%*s", ind, "");
- if (UPPER(t->pt.cond.op) > 0)
- putchar(UPPER(t->pt.cond.op));
- putchar(LOWER(t->pt.cond.op));
- putchar('\n');
- print_tree(t->pt.cond.right, ind+1);
- break;
- case ST_BLOCK:
- print_tree(t->pt.block.head,ind);
- print_tree(t->pt.block.tail,ind);
- break;
- case ST_ASS:
- print_tree(t->pt.ass.left, ind+1);
- printf("%*s =\n", ind, "");
- print_tree(t->pt.ass.right, ind+1);
- break;
- case ST_LEAF:
- printf("%*s", ind, "");
- switch (t->pt.leaf.type){
- case L_VAR:
- putchar('$');
- case L_CONST:
- puts(t->pt.leaf.value);
- break;
- }
- break;
- case ST_ARROW:
- if (t->pt.arrow.kw_left)
- printf("%*s%s\n", ind+1, "", t->pt.arrow.kw_left);
- printf("%*s ->\n", ind, "");
- if (t->pt.arrow.kw_right)
- printf("%*s%s\n", ind+1, "", t->pt.arrow.kw_right);
- if (t->pt.arrow.s)
- print_tree(t->pt.arrow.s,ind+1);
- break;
- case ST_OP:
- print_tree(t->pt.op.left, ind+1);
- printf("%*s%c\n", ind, "", t->pt.op.op);
- print_tree(t->pt.op.right, ind+1);
- break;
- case ST_EMPTY:
- break;
-
-
- }
-}