summaryrefslogtreecommitdiff
path: root/lexer.c
diff options
context:
space:
mode:
authorglenda <glenda@cirno>2022-09-18 19:58:41 +0000
committerglenda <glenda@cirno>2022-09-18 19:58:41 +0000
commite275bf9ff105bbb3e12fcf15e3ab755ed0cd26cf (patch)
tree8db2ea862204c026c2fe5670a15deaaeadc88960 /lexer.c
parent269c81f0217999367b4180e6a795142cbb2d02e7 (diff)
Chain the symbol tables, not the dfn frames
Diffstat (limited to 'lexer.c')
-rw-r--r--lexer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lexer.c b/lexer.c
index 45f5f5f..f684e51 100644
--- a/lexer.c
+++ b/lexer.c
@@ -129,13 +129,13 @@ 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();
+ stmt->toks[stmt->ntoks]->func.scope = getcurrentsymtab();
}else{
stmt->toks[stmt->ntoks] = allocdatum(oplevel == 1 ? MonadicOpTag : DyadicOpTag, 0);
stmt->toks[stmt->ntoks]->operator.type = OperatortypeDop;
stmt->toks[stmt->ntoks]->operator.dyadic = oplevel == 2;
stmt->toks[stmt->ntoks]->operator.dop = runestrdup(buf);
- stmt->toks[stmt->ntoks]->operator.scope = getcurrentdfn();
+ stmt->toks[stmt->ntoks]->operator.scope = getcurrentsymtab();
}
}else if(peek == '('){
int unclosed = 1;