summaryrefslogtreecommitdiff
path: root/identifiers.c
diff options
context:
space:
mode:
Diffstat (limited to 'identifiers.c')
-rw-r--r--identifiers.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/identifiers.c b/identifiers.c
index 876c55a..a70028d 100644
--- a/identifiers.c
+++ b/identifiers.c
@@ -231,3 +231,17 @@ static int ident_index_in_decl(Identifier i, Declaration *d) {
}
return -1;
}
+
+static Location ident_decl_location(Identifier i) {
+ switch (i->decl_kind) {
+ case IDECL_DECL:
+ return i->decl->where;
+ case IDECL_EXPR:
+ return i->decl_expr->where;
+ case IDECL_NONE:
+ break;
+ }
+ assert(0);
+ Location l = {0};
+ return l;
+}