Implement state file output for RGBASM (#1435)

This commit is contained in:
Sylvie
2024-08-05 12:41:40 -04:00
committed by GitHub
parent c5e6a815fa
commit f304e1dd7f
14 changed files with 346 additions and 31 deletions

View File

@@ -106,6 +106,8 @@ static void updateSymbolFilename(Symbol &sym) {
// Create a new symbol by name
static Symbol &createSymbol(std::string const &symName) {
static uint32_t nextDefIndex = 0;
Symbol &sym = symbols[symName];
sym.name = symName;
@@ -115,6 +117,7 @@ static Symbol &createSymbol(std::string const &symName) {
sym.src = fstk_GetFileStack();
sym.fileLine = sym.src ? lexer_GetLineNo() : 0;
sym.ID = -1;
sym.defIndex = nextDefIndex++;
return sym;
}