X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/6cf3716c3166d6d41cdbeea45d018b1760184421..3eb4f1a3e62807125a815dc572da9204b5b51865:/src/symlist.c diff --git a/src/symlist.c b/src/symlist.c index abea6ce7..1fbc5cbb 100644 --- a/src/symlist.c +++ b/src/symlist.c @@ -24,7 +24,6 @@ #include "complain.h" #include "symlist.h" - /*--------------------------------------. | Create a list containing SYM at LOC. | `--------------------------------------*/ @@ -66,7 +65,11 @@ symbol_list_type_new (uniqstr type_name, location loc) symbol_list *res = xmalloc (sizeof *res); res->content_type = SYMLIST_TYPE; - res->content.type_name = type_name; + res->content.sem_type = xmalloc (sizeof (semantic_type)); + res->content.sem_type->tag = type_name; + res->content.sem_type->location = loc; + res->content.sem_type->status = undeclared; + res->location = res->sym_loc = loc; res->named_ref = NULL; res->next = NULL; @@ -208,7 +211,7 @@ symbol_list_n_type_name_get (symbol_list *l, location loc, int n) l = symbol_list_n_get (l, n); if (!l) { - complain_at (loc, _("invalid $ value: $%d"), n); + complain_at (loc, complaint, _("invalid $ value: $%d"), n); return NULL; } aver (l->content_type == SYMLIST_SYMBOL); @@ -238,8 +241,11 @@ symbol_list_code_props_set (symbol_list *node, code_props_type kind, break; case SYMLIST_TYPE: semantic_type_code_props_set - (semantic_type_get (node->content.type_name), + (semantic_type_get (node->content.sem_type->tag, + &node->content.sem_type->location), kind, &cprops); + if (node->content.sem_type->status == undeclared) + node->content.sem_type->status = used; break; case SYMLIST_DEFAULT_TAGGED: default_tagged_code_props_set (kind, &cprops);