- return &default_tagged_destructor;
- return &default_tagless_destructor;
-}
-
-/*--------------------------------------.
-| Set the PRINTER associated with SYM. |
-`--------------------------------------*/
-
-void
-symbol_printer_set (symbol *sym, code_props const *printer)
-{
- if (sym->printer.code)
- symbol_redeclaration (sym, "%printer",
- sym->printer.location, printer->location);
- sym->printer = *printer;
-}
-
-/*---------------------------------------.
-| Set the PRINTER associated with TYPE. |
-`---------------------------------------*/
-
-void
-semantic_type_printer_set (semantic_type *type, code_props const *printer)
-{
- if (type->printer.code)
- semantic_type_redeclaration (type, "%printer",
- type->printer.location, printer->location);
- type->printer = *printer;
-}
-
-/*------------------------------------.
-| Get the computed %printer for SYM. |
-`------------------------------------*/
-
-code_props const *
-symbol_printer_get (symbol const *sym)
-{
- /* Per-symbol %printer. */
- if (sym->printer.code)
- return &sym->printer;
-
- /* Per-type %printer. */
- if (sym->type_name)
- {
- code_props const *printer = &semantic_type_get (sym->type_name)->printer;
- if (printer->code)
- return printer;
- }
-
- /* Apply the default %printer only to user-defined symbols. */
- if (sym->tag[0] == '$' || sym == errtoken)
- return &code_props_none;
-
- if (sym->type_name)
- return &default_tagged_printer;
- return &default_tagless_printer;