mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-11 21:33:04 +00:00
style: split a function in two
grammar_current_rule_action_append was used in two different places:
for actual action (`{...}`), and for predicates (`%?{...}`). Let's
split this in two different functions.
* src/reader.h, src/reader.c (grammar_current_rule_predicate_append): New.
Extracted from...
(grammar_current_rule_action_append): here.
Remove arguments that don't apply.
Adjust dependencies.
This commit is contained in:
@@ -54,8 +54,11 @@ void grammar_current_rule_dprec_set (int dprec, location loc);
|
||||
void grammar_current_rule_merge_set (uniqstr name, location loc);
|
||||
void grammar_current_rule_symbol_append (symbol *sym, location loc,
|
||||
named_ref *nref);
|
||||
/* Attach an ACTION to the current rule. */
|
||||
void grammar_current_rule_action_append (const char *action, location loc,
|
||||
named_ref *nref, bool);
|
||||
named_ref *nref);
|
||||
/* Attach a PREDICATE to the current rule. */
|
||||
void grammar_current_rule_predicate_append (const char *predicate, location loc);
|
||||
void reader (void);
|
||||
void free_merger_functions (void);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user