Refactor structs to use methods instead of functions (#1322)

This commit is contained in:
Sylvie
2024-03-01 13:11:45 -05:00
committed by GitHub
parent e14ba664ea
commit 1ac3c0262f
18 changed files with 364 additions and 446 deletions

View File

@@ -18,9 +18,9 @@ void sym_AddSymbol(Symbol *symbol)
// Check if the symbol already exists
if (Symbol *other = sym_GetSymbol(symbol->name); other) {
fprintf(stderr, "error: \"%s\" both in %s from ", symbol->name.c_str(), symbol->objFileName);
dumpFileStack(symbol->src);
symbol->src->dumpFileStack();
fprintf(stderr, "(%" PRIu32 ") and in %s from ", symbol->lineNo, other->objFileName);
dumpFileStack(other->src);
other->src->dumpFileStack();
fprintf(stderr, "(%" PRIu32 ")\n", other->lineNo);
exit(1);
}