Use FileStackNode constructor to avoid std::monostate possibility

This commit is contained in:
Rangi42
2024-03-05 14:19:23 -05:00
parent 74539f08ba
commit bd88787cb3
4 changed files with 42 additions and 68 deletions

View File

@@ -503,10 +503,10 @@ void obj_ReadFile(char const *fileName, unsigned int fileID) {
// Since SDCC does not provide line info, everything will be reported as coming from the
// object file. It's better than nothing.
nodes[fileID].push_back({
.parent = nullptr,
.lineNo = 0,
.type = NODE_FILE,
.data = fileName,
.parent = nullptr,
.lineNo = 0,
});
std::vector<Symbol> &fileSymbols = symbolLists.emplace_front();