Rework defining variables on command-line

Avoids allocating memory
Detects CLI errors even when failing to open file
Reports symbols as defined on command-line instead of input line 0 (!?)
This commit is contained in:
ISSOtm
2021-01-22 11:03:43 +01:00
parent 3697065afc
commit effc58241d
3 changed files with 31 additions and 75 deletions

View File

@@ -104,6 +104,9 @@ void fstk_DumpCurrent(void)
struct FileStackNode *fstk_GetFileStack(void)
{
if (!contextStack)
return NULL;
struct FileStackNode *node = contextStack->fileInfo;
/* Mark node and all of its parents as referenced if not already so they don't get freed */