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 --- main.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'main.c') diff --git a/main.c b/main.c index 7551958..1397003 100644 --- a/main.c +++ b/main.c @@ -12,8 +12,7 @@ main(int argc, char *argv[]) { int off = 0; stdin = Bfdopen(0, OREAD); - globalsymtab = newsymtab(); - currentsymtab = globalsymtab; + initsymtab(); traceeval = 0; debugmem = 0; @@ -31,7 +30,10 @@ main(int argc, char *argv[]) restart: SETUPERROR(errorcode); if(errorcode){ - currentsymtab = globalsymtab; + /* remove aborted dfn frames */ + while(getcurrentdfn()) + popdfnframe(); + if(globalerror.msg) print("%S: %S\n", errorstrs[errorcode], globalerror.msg); else -- cgit v1.2.3