summaryrefslogtreecommitdiff
path: root/parse/node.c
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2015-09-24 22:39:28 -0700
committerOri Bernstein <ori@eigenstate.org>2015-09-24 22:39:28 -0700
commitdd1dcc663ada21c70e41003564e5c57d671981ac (patch)
treebad8899e9198efafed8684be842521f1e60ae4d1 /parse/node.c
parent53bc10145695df7160e374bca21f4a9510e3fd7d (diff)
downloadmc-dd1dcc663ada21c70e41003564e5c57d671981ac.tar.gz
Put the closure at the function level.
Diffstat (limited to 'parse/node.c')
-rw-r--r--parse/node.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/parse/node.c b/parse/node.c
index f64303d..c3522cb 100644
--- a/parse/node.c
+++ b/parse/node.c
@@ -146,7 +146,7 @@ Node *mkloopstmt(Srcloc loc, Node *init, Node *cond, Node *incr, Node *body)
n->loopstmt.cond = cond;
n->loopstmt.step = incr;
n->loopstmt.body = body;
- n->loopstmt.scope = mkstab();
+ n->loopstmt.scope = mkstab(0);
return n;
}
@@ -194,7 +194,7 @@ Node *mkfunc(Srcloc loc, Node **args, size_t nargs, Type *ret, Node *body)
f->func.args = args;
f->func.nargs = nargs;
f->func.body = body;
- f->func.scope = mkstab();
+ f->func.scope = mkstab(1);
f->func.type = mktyfunc(loc, args, nargs, ret);
for (i = 0; i < nargs; i++)