Compare commits

..

2 Commits

Author SHA1 Message Date
c45131d029 print out what relation is used 2022-03-12 19:26:50 +01:00
a97b6602a0 fixed bug with being to agressive 2022-03-12 19:26:35 +01:00
2 changed files with 7 additions and 7 deletions

View File

@ -154,8 +154,8 @@ prune_children(node_t **simplified, node_t *root)
switch (root->type) switch (root->type)
{ {
case GLOBAL: case GLOBAL:
case ARGUMENT_LIST: //case ARGUMENT_LIST:
case PARAMETER_LIST: //case PARAMETER_LIST:
case STATEMENT: case STATEMENT:
case PRINT_ITEM: case PRINT_ITEM:
case PRINT_STATEMENT: case PRINT_STATEMENT:
@ -287,7 +287,6 @@ flatten(node_t **simplified, node_t *root)
*simplified = result; *simplified = result;
} }
static void static void
simplify_tree ( node_t **simplified, node_t *root ) simplify_tree ( node_t **simplified, node_t *root )
{ {

View File

@ -87,7 +87,8 @@ tree_print(node_t* root, stem head)
printf("─%s", node_string[root->type]); printf("─%s", node_string[root->type]);
if ( root->type == IDENTIFIER_DATA || if ( root->type == IDENTIFIER_DATA ||
root->type == STRING_DATA || root->type == STRING_DATA ||
root->type == EXPRESSION ) root->type == EXPRESSION ||
root->type == RELATION)
printf("(%s)", (char *) root->data); printf("(%s)", (char *) root->data);
else if (root->type == NUMBER_DATA) else if (root->type == NUMBER_DATA)
printf("(%ld)", *((int64_t *)root->data)); printf("(%ld)", *((int64_t *)root->data));