From c58fce34cbf3cb0c0b280c24b8ec62bd5d22b9d6 Mon Sep 17 00:00:00 2001 From: Daniel_Cortez Date: Tue, 14 Nov 2017 19:34:00 +0700 Subject: [PATCH] emit/__emit: New argument type: local variable (name or offset) --- source/compiler/sc1.c | 119 ++++++++++++++++++++++++++++++++++-------- 1 file changed, 96 insertions(+), 23 deletions(-) diff --git a/source/compiler/sc1.c b/source/compiler/sc1.c index a534df2..a641e44 100644 --- a/source/compiler/sc1.c +++ b/source/compiler/sc1.c @@ -5927,6 +5927,39 @@ static void emit_param_data(ucell *p,int size) } while (++curpident!=iCONSTEXPR) + error(17,str); /* undefined symbol */ + } else if (sym->vclass==sSTATIC) { + error(17,str); /* undefined symbol */ + break; + } /* if */ + markusage(sym,uREAD|uWRITTEN); + p[curp]=sym->addr; + break; + default: + emit_invalid_token(tSYMBOL,tok); + } /* switch */ + } while (++curp