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:
ISSOtm
2020-01-22 15:05:07 +01:00
parent e3ef194b4f
commit ab9307ac61
10 changed files with 162 additions and 169 deletions

View File

@@ -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);