summaryrefslogtreecommitdiff
path: root/parse.c
diff options
context:
space:
mode:
Diffstat (limited to 'parse.c')
-rw-r--r--parse.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/parse.c b/parse.c
index 618336a..6ea1362 100644
--- a/parse.c
+++ b/parse.c
@@ -1973,3 +1973,10 @@ static long decl_ident_index(Declaration *d, Identifier i) {
}
return -1;
}
+
+static Value *decl_ident_val(Declaration *d, Identifier i) {
+ if (d->type.kind == TYPE_TUPLE)
+ return &d->val.tuple[decl_ident_index(d, i)];
+ else
+ return &d->val;
+}