diff options
author | Peter Mikkelsen <petermikkelsen10@gmail.com> | 2022-01-23 21:16:02 +0000 |
---|---|---|
committer | Peter Mikkelsen <petermikkelsen10@gmail.com> | 2022-01-23 21:16:02 +0000 |
commit | 9a938d3ce26b2d3728d791c0f858acdbd50223b5 (patch) | |
tree | a64151c171f0c289847c83367a678fd3252f2f99 /lexer.c | |
parent | 3aa88a917e8c44ab088498dcfc18c48e66ceb243 (diff) |
Rework symbol lookup to use lexical scoping, and implement recursive function call via ∇
Diffstat (limited to 'lexer.c')
-rw-r--r-- | lexer.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -131,7 +131,7 @@ get_digits: Rune *name = L"?"; name[0] = line[offset]; stmt->toks[stmt->ntoks].tag = NameTag; - stmt->toks[stmt->ntoks].symbol = getsym(currentsymtab, name); + stmt->toks[stmt->ntoks].symbol = getsym(name); offset++; }else if(isalpharune(line[offset])){ Rune buf[64]; @@ -143,7 +143,7 @@ get_digits: } *p = 0; stmt->toks[stmt->ntoks].tag = NameTag; - stmt->toks[stmt->ntoks].symbol = getsym(currentsymtab, buf); + stmt->toks[stmt->ntoks].symbol = getsym(buf); }else if(runestrchr(L"⎕⍞", line[offset])){ /* quad names */ Rune buf[64]; |