Mercurial > hg-old > index.cgi
diff lwasm/parse.c @ 244:c8bcc396ec59 2.x
Allow symbols to appear after whitespace when terminated by :
author | lost |
---|---|
date | Wed, 16 Sep 2009 00:29:06 +0000 |
parents | a58f49a77441 |
children | 0986834ec7d3 |
line wrap: on
line diff
--- a/lwasm/parse.c Tue Sep 15 03:16:17 2009 +0000 +++ b/lwasm/parse.c Wed Sep 16 00:29:06 2009 +0000 @@ -70,6 +70,7 @@ return; // if we start with a non-space character, it's a symbol +symbolagain: if (!isspace(*p)) { // we have a symbol specified here @@ -113,6 +114,12 @@ memcpy(opc, p, p2 - p); opc[p2 - p] = '\0'; + if (strchr(opc, ':')) + { + lwasm_free(opc); + goto symbolagain; + } + l -> forceglobal = 0; // if the opcode contains an =, treat it as "symbol = expr" if (!sym && strchr(opc, '='))