summaryrefslogtreecommitdiff
path: root/lexer.c
diff options
context:
space:
mode:
Diffstat (limited to 'lexer.c')
-rw-r--r--lexer.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lexer.c b/lexer.c
index ed2c2e4..93fdb62 100644
--- a/lexer.c
+++ b/lexer.c
@@ -118,6 +118,7 @@ lexline(InputStream *input, int toplevel)
stmt->toks[stmt->ntoks] = allocdatum(FunctionTag, 0);
stmt->toks[stmt->ntoks]->func.type = FunctypeDfn;
stmt->toks[stmt->ntoks]->func.dfn = runestrdup(buf);
+ stmt->toks[stmt->ntoks]->func.scope = getcurrentdfn();
}else{
stmt->toks[stmt->ntoks] = allocdatum(oplevel == 1 ? MonadicOpTag : DyadicOpTag, 0);
stmt->toks[stmt->ntoks]->operator.type = OperatortypeDop;