diff options
author | glenda <glenda@cirno> | 2022-09-18 19:58:41 +0000 |
---|---|---|
committer | glenda <glenda@cirno> | 2022-09-18 19:58:41 +0000 |
commit | e275bf9ff105bbb3e12fcf15e3ab755ed0cd26cf (patch) | |
tree | 8db2ea862204c026c2fe5670a15deaaeadc88960 /lexer.c | |
parent | 269c81f0217999367b4180e6a795142cbb2d02e7 (diff) |
Chain the symbol tables, not the dfn frames
Diffstat (limited to 'lexer.c')
-rw-r--r-- | lexer.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; |