mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-11 21:33:04 +00:00
errors: indent "invalid value for %define" context
This is the continuation of the work on the readability of errors
context.
For example, what used to be:
input.y:1.9-29: invalid value for %define variable 'foo' : 'bar'
input.y:1.9-29: accepted value: 'most'
is now:
input.y:1.9-29: invalid value for %define variable 'foo' : 'bar'
input.y:1.9-29: accepted value: 'most'
* src/muscle-tab.c (muscle_percent_define_check_values): Use
complain_at_indent to output with increased indentation level.
* tests/input:at: Apply this change.
Signed-off-by: Akim Demaille <akim@lrde.epita.fr>
This commit is contained in:
committed by
Akim Demaille
parent
6b1e1872d4
commit
a974c1ec26
@@ -593,12 +593,15 @@ muscle_percent_define_check_values (char const * const *values)
|
||||
}
|
||||
if (!*values)
|
||||
{
|
||||
unsigned i = 0;
|
||||
location loc = muscle_percent_define_get_loc (*variablep);
|
||||
complain_at(loc,
|
||||
_("invalid value for %%define variable %s: %s"),
|
||||
quote (*variablep), quote_n (1, value));
|
||||
complain_at_indent (loc, &i,
|
||||
_("invalid value for %%define variable %s: %s"),
|
||||
quote (*variablep), quote_n (1, value));
|
||||
i += SUB_INDENT;
|
||||
for (values = variablep + 1; *values; ++values)
|
||||
complain_at (loc, _("accepted value: %s"), quote (*values));
|
||||
complain_at_indent (loc, &i, _("accepted value: %s"),
|
||||
quote (*values));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user