aboutsummaryrefslogtreecommitdiff
path: root/sem_check.c
diff options
context:
space:
mode:
Diffstat (limited to 'sem_check.c')
-rw-r--r--sem_check.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sem_check.c b/sem_check.c
index da54a21..44eb82f 100644
--- a/sem_check.c
+++ b/sem_check.c
@@ -74,7 +74,12 @@ ptree *t;
if (t->r->ret_type == t->l->ret_type)
return BOOL;
else
- yyerror("Misssing nodes\n");
+ snprintf(buf, 100, "Mismached types: "
+ "Type %s "
+ "cannot be compared to type %s\n",
+ pretty_type(t->r->ret_type),
+ pretty_type(t->l->ret_type));
+ yyerror(buf);
break;
case NOT:
if (t->ret_type == BOOL)
@@ -82,7 +87,6 @@ ptree *t;
yyerror("NOT needs bool input\n");
break;
case INUM:
- printf("INUM: %d", t->attr.ival);
return INT;
case RNUM:
return REAL;