diagnostics: show locations in full when debugging

This is meant for developers, not end users, that's why I attached it
to --trace.

* src/getargs.h, src/getargs.c (trace_locations): New.
* src/location.c (location_print): Use it.
This commit is contained in:
Akim Demaille
2019-04-27 14:33:26 +02:00
parent 8f5d475079
commit 91b8f3f171
3 changed files with 44 additions and 24 deletions

View File

@@ -185,6 +185,7 @@ ARGMATCH_VERIFY (report_args, report_types);
static const char * const trace_args[] =
{
"none - no traces",
"locations - full display of the locations",
"scan - grammar scanner traces",
"parse - grammar parser traces",
"automaton - construction of the automaton",
@@ -206,6 +207,7 @@ static const char * const trace_args[] =
static const int trace_types[] =
{
trace_none,
trace_locations,
trace_scan,
trace_parse,
trace_automaton,