From d3c0cf6bae6bdca2bcf5be64db289d370ce58c76 Mon Sep 17 00:00:00 2001 From: Amyr Ahmady Date: Tue, 1 Oct 2019 17:30:00 +0330 Subject: [PATCH] remove `emit` keyword --- source/compiler/sc.h | 1 - source/compiler/sc1.c | 4 +--- source/compiler/sc2.c | 7 +++---- source/compiler/sc3.c | 1 - 4 files changed, 4 insertions(+), 9 deletions(-) diff --git a/source/compiler/sc.h b/source/compiler/sc.h index 4b9ed03..ff1f8dc 100644 --- a/source/compiler/sc.h +++ b/source/compiler/sc.h @@ -365,7 +365,6 @@ enum { tDEFINED, tDO, tELSE, - tEMIT, t__EMIT, tEND, tENUM, diff --git a/source/compiler/sc1.c b/source/compiler/sc1.c index d6f9a21..81bbb87 100644 --- a/source/compiler/sc1.c +++ b/source/compiler/sc1.c @@ -1693,7 +1693,6 @@ static void parse(void) case 0: /* ignore zero's */ break; - case tEMIT: case t__EMIT: emit_flags |= efGLOBAL; lex(&val,&str); @@ -5405,13 +5404,12 @@ static void statement(int *lastindent,int allow_decl) matchtoken(tSTATIC); decl_enum(sLOCAL,FALSE); break; - case tEMIT: case t__EMIT: { extern char *sc_tokens[]; const unsigned char *bck_lptr=lptr-strlen(sc_tokens[tok-tFIRST]); if (matchtoken('{')) { emit_flags |= efBLOCK; - lastst=tEMIT; + lastst=t__EMIT; break; } /* if */ lptr=bck_lptr; diff --git a/source/compiler/sc2.c b/source/compiler/sc2.c index d822cf6..25c0d9d 100644 --- a/source/compiler/sc2.c +++ b/source/compiler/sc2.c @@ -2171,10 +2171,9 @@ char *sc_tokens[] = { "||", "&&", "==", "!=", "<=", ">=", "<<", ">>>", ">>", "++", "--", "...", "..", "assert", "*begin", "break", "case", "char", "const", "continue", "default", - "defined", "do", "else", "emit", "__emit", "*end", "enum", "exit", "for", - "forward", "goto", "if", "native", "new", "operator", "public", "return", - "sizeof", "sleep", "state", "static", "stock", "switch", "tagof", "*then", - "while", + "defined", "do", "else", "__emit", "*end", "enum", "exit", "for", "forward", + "goto", "if", "native", "new", "operator", "public", "return", "sizeof", + "sleep", "state", "static", "stock", "switch", "tagof", "*then", "while", "#assert", "#define", "#else", "#elseif", "#emit", "#endif", "#endinput", "#endscript", "#error", "#file", "#if", "#include", "#line", "#pragma", "#tryinclude", "#undef", "#warning", diff --git a/source/compiler/sc3.c b/source/compiler/sc3.c index f87274c..d571b84 100644 --- a/source/compiler/sc3.c +++ b/source/compiler/sc3.c @@ -1462,7 +1462,6 @@ static int hier2(value *lval) } /* if */ return FALSE; } /* case */ - case tEMIT: case t__EMIT: paranthese=matchtoken('('); emit_flags |= efEXPR;