From b506d9bfcb9e96d07264a43da7bdf136329dbc86 Mon Sep 17 00:00:00 2001 From: Theophile Ranquet <theophile.ranquet@gmail.com> Date: Fri, 28 Sep 2012 12:12:59 +0000 Subject: [PATCH] errors: indent "user token number redeclaration" context This is the continuation of the work on the readability of errors context. * src/symtab.c (user_token_number_redeclaration): 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> --- src/symtab.c | 1 + tests/input.at | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/symtab.c b/src/symtab.c index 2e0b9201..56cfe511 100644 --- a/src/symtab.c +++ b/src/symtab.c @@ -534,6 +534,7 @@ user_token_number_redeclaration (int num, symbol *first, symbol *second) complain_at_indent (second->location, &i, _("user token number %d redeclaration for %s"), num, second->tag); + i += SUB_INDENT; complain_at_indent (first->location, &i, _("previous declaration for %s"), first->tag); diff --git a/tests/input.at b/tests/input.at index 50c10506..86a955dc 100644 --- a/tests/input.at +++ b/tests/input.at @@ -693,9 +693,9 @@ start: DECIMAL_1 HEXADECIMAL_2; AT_BISON_CHECK([redecl.y], [1], [], [[redecl.y:10.10-22: error: user token number 11259375 redeclaration for HEXADECIMAL_1 -redecl.y:9.8-16: previous declaration for DECIMAL_1 +redecl.y:9.8-16: previous declaration for DECIMAL_1 redecl.y:12.10-18: error: user token number 16702650 redeclaration for DECIMAL_2 -redecl.y:11.10-22: previous declaration for HEXADECIMAL_2 +redecl.y:11.10-22: previous declaration for HEXADECIMAL_2 ]]) AT_DATA_GRAMMAR([too-large.y], -- 2.47.2