mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-13 06:13:02 +00:00
diagnostics: give m4 precise locations
Currently we pass only the columns based on the screen-width, which is important for the carets. But we don't pass the bytes-based columns, which is important for the colors. Pass both. * src/muscle-tab.c (muscle_boundary_grow): Also pass the byte-based column. * src/location.c (location_caret): Clarify. (boundary_set_from_string): Adjust to the new format. * tests/diagnostics.at (Tabulations and multibyte characters from M4): New.
This commit is contained in:
@@ -135,7 +135,8 @@ location_cmp (location a, location b)
|
||||
/* Whether this is the empty location. */
|
||||
bool location_empty (location loc);
|
||||
|
||||
/* LOC_STR must be formatted as 'file:line.column', it will be modified. */
|
||||
void boundary_set_from_string (boundary *bound, char *loc_str);
|
||||
/* STR must be formatted as 'file:line.column@byte' or 'file:line.column',
|
||||
it will be modified. */
|
||||
void boundary_set_from_string (boundary *bound, char *str);
|
||||
|
||||
#endif /* ! defined LOCATION_H_ */
|
||||
|
||||
Reference in New Issue
Block a user