summaryrefslogtreecommitdiff
path: root/parse/dump.c
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2014-12-20 21:48:16 -0800
committerOri Bernstein <ori@eigenstate.org>2014-12-20 21:48:16 -0800
commit2ae93e1a3458a196f0e3a78b311f58cecf4e5e78 (patch)
tree6d6e66f80576dbe7b36b8f479274ac97eca16322 /parse/dump.c
parent7581a6e2837eba83c9ba1406367c7310a42658f1 (diff)
downloadmc-2ae93e1a3458a196f0e3a78b311f58cecf4e5e78.tar.gz
Improve error reporting.
Double declarations now say where they were double declared.
Diffstat (limited to 'parse/dump.c')
-rw-r--r--parse/dump.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/parse/dump.c b/parse/dump.c
index 73586ad..6303cd7 100644
--- a/parse/dump.c
+++ b/parse/dump.c
@@ -113,7 +113,7 @@ static void outnode(Node *n, FILE *fd, int depth)
findentf(fd, depth, "Nil\n");
return;
}
- findentf(fd, depth, "%s.%zd@%i", nodestr(n->type), n->nid, n->loc.line);
+ findentf(fd, depth, "%s.%zd@%i", nodestr(n->type), n->nid, lnum(n->loc));
switch(n->type) {
case Nfile:
fprintf(fd, "(name = %s)\n", n->file.files[0]);