Make carets line up in dtc diagnostics if the line starts with a tab.
This commit is contained in:
parent
4a62545173
commit
8d9c809950
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=254327
@ -216,7 +216,8 @@ input_buffer::parse_error(const char *msg)
|
|||||||
putc('\n', stderr);
|
putc('\n', stderr);
|
||||||
for (int i=0 ; i<(cursor-line_start) ; ++i)
|
for (int i=0 ; i<(cursor-line_start) ; ++i)
|
||||||
{
|
{
|
||||||
putc(' ', stderr);
|
char c = (buffer[i+line_start] == '\t') ? '\t' : ' ';
|
||||||
|
putc(c, stderr);
|
||||||
}
|
}
|
||||||
putc('^', stderr);
|
putc('^', stderr);
|
||||||
putc('\n', stderr);
|
putc('\n', stderr);
|
||||||
|
Loading…
Reference in New Issue
Block a user