From 58e3054794cde4148267d81c80cc3109fbd19298 Mon Sep 17 00:00:00 2001 From: katherine Date: Wed, 29 May 2019 17:11:35 -0700 Subject: update usage checking --- src/parse.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/parse.c') diff --git a/src/parse.c b/src/parse.c index 57db35c..a70f28d 100644 --- a/src/parse.c +++ b/src/parse.c @@ -112,6 +112,8 @@ static void sub_parse_deftype(size_t line, size_t col, bool is_union) .col = col, .is_used = false, .is_union = is_union, + .is_in_array = false, + .is_in_hash = false, .member_list_len = 0, }; unsigned i, j; @@ -366,6 +368,11 @@ struct parse_result_s parse(FILE *f, const char *fname) vcur->name, vcur->deftype_name); } dcur->is_used = true; + if (vcur->type == PARSE_TYPE_ARRAY_DEFTYPE) + dcur->is_in_array = true; + else if (vcur->type == PARSE_TYPE_HASH_DEFTYPE) + dcur->is_in_hash = true; + default: continue; } -- cgit v1.2.3