summaryrefslogtreecommitdiff
path: root/parse/node.c
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2014-02-01 11:14:46 -0500
committerOri Bernstein <ori@eigenstate.org>2014-02-01 11:14:46 -0500
commit196258441277732b8ab24471404b7fd21a81987a (patch)
tree39540da097170c881b0dc3a79c1dba8ece6c980a /parse/node.c
parent3e51d386096b13c255d6aec4406f85548e9e7d63 (diff)
downloadmc-196258441277732b8ab24471404b7fd21a81987a.tar.gz
Stub in more code for trait/impl.
We now make Impl nodes, and then die when we try to use them.
Diffstat (limited to 'parse/node.c')
-rw-r--r--parse/node.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/parse/node.c b/parse/node.c
index e0d0ab6..af6c1c7 100644
--- a/parse/node.c
+++ b/parse/node.c
@@ -196,6 +196,17 @@ Node *mktraitdef(int line, Node *name, Node **funcs, size_t nfuncs, Node **membs
return n;
}
+Node *mkimplstmt(int line, Node *name, Type *t)
+{
+ Node *n;
+
+ n = mknode(line, Nimpl);
+ n->impl.traitname = name;
+ n->impl.type = t;
+ return n;
+}
+
+
Node *mkintlit(int line, uvlong val)
{
return mkexpr(line, Olit, mkint(line, val), NULL);