From 1c292035e12d4c2c782f1dba6f78e690ad5635b3 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Fri, 27 Jul 2012 12:47:02 +0200 Subject: printer/destructor: translate only once Currently "%printer {...} a b c d e f" translates the {...} six times. Not only is this bad for time and space, it also issues six times the same warnings. * src/symlist.h, src/symlist.c (symbol_list_destructor_set) (symbol_list_printer_set): Take the action as code_props instead of const char *. * src/parse-gram.y: Translate these actions here. * src/scan-code.h: Comment change. * tests/input.at: Check that warnings are issued only once. --- src/symlist.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/symlist.h') diff --git a/src/symlist.h b/src/symlist.h index 43936b29..63577f79 100644 --- a/src/symlist.h +++ b/src/symlist.h @@ -119,11 +119,11 @@ uniqstr symbol_list_n_type_name_get (symbol_list *l, location loc, int n); bool symbol_list_null (symbol_list *node); /** Set the \c \%destructor for \c node as \c code at \c loc. */ -void symbol_list_destructor_set (symbol_list *node, char const *code, - location loc); +void symbol_list_destructor_set (symbol_list *node, + code_props const *destructor); /** Set the \c \%printer for \c node as \c code at \c loc. */ -void symbol_list_printer_set (symbol_list *node, char const *code, - location loc); +void symbol_list_printer_set (symbol_list *node, + code_props const *printer); #endif /* !SYMLIST_H_ */ -- cgit v1.2.1