summaryrefslogtreecommitdiff
path: root/parse/node.c
diff options
context:
space:
mode:
authorOri Bernstein <ori@markovcorp.com>2019-02-26 14:07:58 -0800
committerOri Bernstein <ori@markovcorp.com>2019-02-26 14:07:58 -0800
commitd87c0959d85b40fcf60b9c6dd0a2f2111f888b55 (patch)
tree3d9ee97668eda3d4e2656ac069f8575250edc7e2 /parse/node.c
parent02201160614e5f25a7a73d86ed26a1f90fa4f5bb (diff)
downloadmc-d87c0959d85b40fcf60b9c6dd0a2f2111f888b55.tar.gz
Accept that `file` isn't a node.
Shrink node sizes, simplify code a bit.
Diffstat (limited to 'parse/node.c')
-rw-r--r--parse/node.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/parse/node.c b/parse/node.c
index e4332f9..0bc31c0 100644
--- a/parse/node.c
+++ b/parse/node.c
@@ -21,7 +21,7 @@ size_t ndecls;
char *
fname(Srcloc l)
{
- return file->file.files[l.file];
+ return file.files[l.file];
}
int
@@ -65,17 +65,6 @@ mknode(Srcloc loc, Ntype nt)
}
Node *
-mkfile(char *name)
-{
- Node *n;
-
- n = mknode(Zloc, Nfile);
- n->file.ns = mkht(strhash, streq);
- lappend(&n->file.files, &n->file.nfiles, strdup(name));
- return n;
-}
-
-Node *
mkuse(Srcloc loc, char *use, int islocal)
{
Node *n;
@@ -596,7 +585,7 @@ did(Node *n)
assert(exprop(n) == Ovar);
return n->expr.did;
}
- dump(n, stderr);
+ dumpn(n, stderr);
die("Can't get did");
return 0;
}