diff options
author | Tucker Evans <tuckerevans24@gmail.com> | 2019-09-28 23:03:06 -0400 |
---|---|---|
committer | Tucker Evans <tuckerevans24@gmail.com> | 2019-09-29 21:53:21 -0400 |
commit | 3134c0f655d80bac47be7c4bfb928bc8975ed6ea (patch) | |
tree | 97fb51ad70fd189d3a7b9ea45c15c94617fe0522 | |
parent | 7605f2254536db2052690f0b91ff8110ab8a6828 (diff) |
Add check for read/write function in check_call
Read/write should take arguments of any type, almost funcition
overloading, at this point theses are the only fuctions to do this and
as such a special case is added to check_call.
-rw-r--r-- | sem_check.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sem_check.c b/sem_check.c index af97507..77803e1 100644 --- a/sem_check.c +++ b/sem_check.c @@ -189,6 +189,9 @@ ptree *t; if (!(t->l && t->l->attr.nval && t->l->attr.nval->func_info)) yyerror("Incorrect Call Tree\n"); + if (!(strcmp(t->l->attr.nval->name, "write") && strcmp(t->l->attr.nval->name, "read"))) + return; + argc = t->l->attr.nval->func_info->argc; if (t->l->attr.nval->func_info->argc != count_args(t->r)) /*TODO add info about expected argument count*/ |