Make carets line up in dtc diagnostics if the line starts with a tab.

This commit is contained in:
David Chisnall 2013-08-14 14:34:02 +00:00
parent 4a62545173
commit 8d9c809950
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=254327

View File

@ -216,7 +216,8 @@ input_buffer::parse_error(const char *msg)
putc('\n', stderr);
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('\n', stderr);