diff options
Diffstat (limited to 'identifiers.c')
-rw-r--r-- | identifiers.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/identifiers.c b/identifiers.c index a9b4540..030ec76 100644 --- a/identifiers.c +++ b/identifiers.c @@ -177,6 +177,16 @@ static void idents_test(void) { idents_free(&ids); } +static int ident_index_in_decl(Identifier i, Declaration *d) { + int index = 0; + arr_foreach(d->idents, Identifier, j) { + if (i == *j) + return index; + index++; + } + return -1; +} + static Type *ident_typeval(Identifier i) { Value *val; IdentDecl *idecl = ident_decl(i); |