diff --git a/src/dobjtype.cpp b/src/dobjtype.cpp index 76ac790953..161dc74e3f 100644 --- a/src/dobjtype.cpp +++ b/src/dobjtype.cpp @@ -2507,6 +2507,11 @@ PSymbolTable::PSymbolTable() { } +PSymbolTable::PSymbolTable(PSymbolTable *parent) +: ParentSymbolTable(parent) +{ +} + PSymbolTable::~PSymbolTable () { ReleaseSymbols(); diff --git a/src/dobjtype.h b/src/dobjtype.h index 402a90ffce..98f1187b9e 100644 --- a/src/dobjtype.h +++ b/src/dobjtype.h @@ -73,6 +73,7 @@ public: struct PSymbolTable { PSymbolTable(); + PSymbolTable(PSymbolTable *parent); ~PSymbolTable(); size_t MarkSymbols(); diff --git a/src/zscript/zcc_parser.cpp b/src/zscript/zcc_parser.cpp index 8a9ea45672..b79de0f626 100644 --- a/src/zscript/zcc_parser.cpp +++ b/src/zscript/zcc_parser.cpp @@ -255,7 +255,7 @@ static void DoParse(const char *filename) ZCCParse(parser, 0, value, &state); ZCCParseFree(parser, free); - PSymbolTable symbols; + PSymbolTable symbols(&GlobalSymbols); ZCCCompiler cc(state, NULL, symbols); cc.Compile(); #ifdef _DEBUG