mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-11 05:13:04 +00:00
diagnostics: also show suggested %empty
* src/reader.c (grammar_rule_check_and_complete): Suggest to add %empty. * tests/actions.at, tests/diagnostics.at: Adjust expectations.
This commit is contained in:
@@ -358,6 +358,8 @@ grammar_rule_check_and_complete (symbol_list *r)
|
||||
&& warning_is_enabled (Wempty_rule))
|
||||
{
|
||||
complain (&r->rhs_loc, Wempty_rule, _("empty rule without %%empty"));
|
||||
if (feature_flag & feature_caret)
|
||||
location_caret_suggestion (r->rhs_loc, "%empty", stderr);
|
||||
location loc = r->rhs_loc;
|
||||
loc.end = loc.start;
|
||||
fixits_register (&loc, " %empty ");
|
||||
|
||||
Reference in New Issue
Block a user