%merge: let mergers record a typing-symbol, rather than a type

Symbols are richer than types, and in M4 it is my simpler (and more
common) to deal with symbols rather than types.  So let's associate
mergers to a symbol rather than a type name.

* src/reader.h (merger_list): Replace the 'type' member by a symbol
member.
* src/reader.c (record_merge_function_type): Take a symbol as
argument, rather than a type name.
* src/output.c (merger_output): Adjust.
This commit is contained in:
Akim Demaille
2020-12-30 08:27:24 +01:00
parent edfcca8481
commit ac3d5b76f7
3 changed files with 25 additions and 23 deletions

View File

@@ -31,7 +31,10 @@ typedef struct merger_list
{
struct merger_list* next;
uniqstr name;
uniqstr type;
/* One symbol whose type is the one used by all the symbols on which
this merging function is used. */
symbol *sym;
/* Where SYM was bound to this merging function. */
location type_declaration_loc;
} merger_list;