summaryrefslogtreecommitdiff
path: root/parse/dump.c
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2014-10-07 20:17:58 -0400
committerOri Bernstein <ori@eigenstate.org>2014-10-07 20:17:58 -0400
commit7088e222cf1b0ae17607ce0ac232067a172b851e (patch)
tree6617fb95823025f21b60cc0f0270548bad2730fb /parse/dump.c
parent6b45f935bd240eb066fe4edd49b8cd0853bc5dd9 (diff)
downloadmc-7088e222cf1b0ae17607ce0ac232067a172b851e.tar.gz
Keep track of source files as well as line numbers.
This makes our error messages better *AND* makes it easier to provide good debug info later.
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 bbb6697..d8b4257 100644
--- a/parse/dump.c
+++ b/parse/dump.c
@@ -110,7 +110,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->line);
+ findentf(fd, depth, "%s.%zd@%i", nodestr(n->type), n->nid, n->loc.line);
switch(n->type) {
case Nfile:
fprintf(fd, "(name = %s)\n", n->file.files[0]);