diff options
Diffstat (limited to 'infer.c')
-rw-r--r-- | infer.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -1,9 +1,12 @@ /* match and to are dynamic arrays of equal size -find the value (and put it into val) of ident by matching match[i] to to[i], i = 0..arr_len(match)-1 +idents is a dyn array +find the value of each ident by matching match[i] to to[i], i = 0..arr_len(match)-1 all the types in match must be resolved, and all the types in to must be unresolved */ -static bool infer(Type **match, Type **to, Identifier ident, Value *val, Type *type) { +static bool infer(Type **match, Type **to, Identifier *idents, Value *vals, Type *types) { + Value *val = vals; + Type *type = types; val->type = calloc(1,sizeof(Type)); val->type->flags = TYPE_IS_RESOLVED; val->type->kind = TYPE_BUILTIN; |