summaryrefslogtreecommitdiff
path: root/parse/node.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/node.c
parent7581a6e2837eba83c9ba1406367c7310a42658f1 (diff)
downloadmc-2ae93e1a3458a196f0e3a78b311f58cecf4e5e78.tar.gz
Improve error reporting.
Double declarations now say where they were double declared.
Diffstat (limited to 'parse/node.c')
-rw-r--r--parse/node.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/parse/node.c b/parse/node.c
index 65f93e5..8ddf512 100644
--- a/parse/node.c
+++ b/parse/node.c
@@ -18,6 +18,16 @@ size_t ndecls;
Node **exportimpls;
size_t nexportimpls;
+char *fname(Srcloc l)
+{
+ return file->file.files[l.file];
+}
+
+int lnum(Srcloc l)
+{
+ return l.line;
+}
+
Node *mknode(Srcloc loc, Ntype nt)
{
Node *n;