]> git.saurik.com Git - bison.git/blobdiff - src/symtab.c
* src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
[bison.git] / src / symtab.c
index 0d8e1f494ed9b9c110a393e48b85ecd155fe6c85..655b8fa9cac017b460a0a95dfe4cd09802da9a9a 100644 (file)
@@ -47,9 +47,11 @@ symbol_new (const char *tag, location_t location)
   symbol_t *res = XMALLOC (symbol_t, 1);
 
   res->tag = xstrdup (tag);
+  res->location = location;
+
   res->type_name = NULL;
   res->destructor = NULL;
-  res->location = location;
+
   res->number = NUMBER_UNDEFINED;
   res->prec = 0;
   res->assoc = right_assoc;
@@ -130,6 +132,7 @@ symbol_destructor_set (symbol_t *symbol, location_t location, char *destructor)
                     _("destructor redeclaration for %s"),
                     symbol_tag_get (symbol));
       symbol->destructor = destructor;
+      symbol->destructor_location = location;
     }
 }