summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2013-02-20 11:58:25 -0500
committerOri Bernstein <ori@eigenstate.org>2013-02-20 11:58:25 -0500
commit173bb6e6c75b1898527b187c030093bc8832d4fc (patch)
tree70c8d7cf2d9286b99a1da30a48d50d07b871bfcf
parent3e92cda1745121a0545c581d9f135feed9e280bd (diff)
downloadmc-173bb6e6c75b1898527b187c030093bc8832d4fc.tar.gz
Print the filename in syntax errors.
Why weren't we doing this earlier?
-rw-r--r--parse/gram.y2
1 files changed, 1 insertions, 1 deletions
diff --git a/parse/gram.y b/parse/gram.y
index 9c0874c..3ff1d3b 100644
--- a/parse/gram.y
+++ b/parse/gram.y
@@ -760,7 +760,7 @@ static void installucons(Stab *st, Type *t)
void yyerror(const char *s)
{
- fprintf(stderr, "%d: %s", line, s);
+ fprintf(stderr, "%s:%d: %s", filename, line, s);
if (curtok->str)
fprintf(stderr, " near \"%s\"", curtok->str);
fprintf(stderr, "\n");