From 9a938d3ce26b2d3728d791c0f858acdbd50223b5 Mon Sep 17 00:00:00 2001 From: Peter Mikkelsen Date: Sun, 23 Jan 2022 21:16:02 +0000 Subject: =?UTF-8?q?Rework=20symbol=20lookup=20to=20use=20lexical=20scoping?= =?UTF-8?q?,=20and=20implement=20recursive=20function=20call=20via=20?= =?UTF-8?q?=E2=88=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lexer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lexer.c') diff --git a/lexer.c b/lexer.c index 3be2359..f56a623 100644 --- a/lexer.c +++ b/lexer.c @@ -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]; -- cgit v1.2.3