]> git.saurik.com Git - bison.git/commit
errors: indent "result type clash" error context
authorTheophile Ranquet <ranquet@lrde.epita.fr>
Wed, 26 Sep 2012 09:49:18 +0000 (11:49 +0200)
committerAkim Demaille <akim@lrde.epita.fr>
Wed, 26 Sep 2012 10:00:29 +0000 (12:00 +0200)
commit24d96dd3ebb49d003c29904fc5152ee5ec220e86
tree9b455d80dad7c1cc9cc16b33f2352677cda16695
parent63fec1eebaa06269d7017c383e293ad3d3e6475d
errors: indent "result type clash" error context

This used to be the format of the error report:

  input.y:6.5-10: result type clash on merge function 'merge': [...]
  input.y:2.4-9: previous declaration

In order to distinguish the actual error from the context provided, we
rather this new output:

  input.y:6.5-10: result type clash on merge function 'merge': [...]
  input.y:2.4-9:     previous declaration

Another patch will introduce an "error: " prefix to all non-indented
lines, giving yet better readability to the reports.

* src/complain.h (SUB_INDENT): Move to here.
* src/reader.c (record_merge_function_type): Use complain_at_indent to
output with increased indentation level.
* src/scan-code.l (SUB_INDENT): Remove from here.
* tests/glr-regression.at: Apply this change.

Signed-off-by: Akim Demaille <akim@lrde.epita.fr>
THANKS
src/complain.h
src/reader.c
tests/glr-regression.at