mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-26 21:12:07 +00:00
Clean up symbol management
Stop using that bitfield for everything, including what can be determined otherwise It also makes it easier to have a sane state, since some bits were (supposedly) mutually exclusive
This commit is contained in:
@@ -277,20 +277,24 @@ uint32_t ParseSymbol(char *src, uint32_t size)
|
||||
yyunputstr(rest);
|
||||
|
||||
/* If the symbol is an EQUS, expand it */
|
||||
if (!oDontExpandStrings && sym_isString(dest)) {
|
||||
char *s;
|
||||
if (!oDontExpandStrings) {
|
||||
struct sSymbol const *sym = sym_FindSymbol(dest);
|
||||
|
||||
lex_BeginStringExpansion(dest);
|
||||
if (sym && sym->type == SYM_EQUS) {
|
||||
char *s;
|
||||
|
||||
/* Feed the symbol's contents into the buffer */
|
||||
yyunputstr(s = sym_GetStringValue(dest));
|
||||
lex_BeginStringExpansion(dest);
|
||||
|
||||
/* Lines inserted this way shall not increase nLineNo */
|
||||
while (*s) {
|
||||
if (*s++ == '\n')
|
||||
nLineNo--;
|
||||
/* Feed the symbol's contents into the buffer */
|
||||
yyunputstr(s = sym_GetStringValue(sym));
|
||||
|
||||
/* Lines inserted this way shall not increase nLineNo */
|
||||
while (*s) {
|
||||
if (*s++ == '\n')
|
||||
nLineNo--;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
strcpy(yylval.tzSym, dest);
|
||||
|
||||
Reference in New Issue
Block a user