mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-11 05:13:04 +00:00
diagnostics: fix locations coming from M4
Locations issued from M4 need the byte-based column for the diagnostics to work properly. Currently they were unassigned, which typically resulted in partially non-colored diagnostics. * src/location.c (boundary_set_from_string): Fix the parsed location. * src/muscle-tab.c (muscle_percent_define_default): Set the byte values. * tests/diagnostics.at (Locations from M4): New.
This commit is contained in:
@@ -296,7 +296,7 @@ boundary_set_from_string (boundary *bound, char *loc_str)
|
||||
char *delim = strrchr (loc_str, '.');
|
||||
aver (delim);
|
||||
*delim = '\0';
|
||||
bound->column = atoi (delim+1);
|
||||
bound->byte = bound->column = atoi (delim+1);
|
||||
delim = strrchr (loc_str, ':');
|
||||
aver (delim);
|
||||
*delim = '\0';
|
||||
|
||||
Reference in New Issue
Block a user