Rename AST structures to Tree and relocate freeing logic
This commit is contained in:
@@ -14,7 +14,7 @@ static char* s_logOutput = NULL;
|
||||
static const char* s_currentTestName = NULL;
|
||||
static char* s_testSource = NULL;
|
||||
|
||||
static Module* s_currentModule = NULL;
|
||||
static ModuleTree* s_currentModule = NULL;
|
||||
static TokenStream* s_currentTokenStream = NULL;
|
||||
|
||||
void fail(const char* msg) {
|
||||
@@ -90,7 +90,7 @@ TokenStream* test_get_tokenstream(void) {
|
||||
return s_currentTokenStream;
|
||||
}
|
||||
|
||||
Module* test_get_ast(void) {
|
||||
ModuleTree* test_get_ast(void) {
|
||||
if (s_currentModule == NULL) {
|
||||
s_currentModule = parser_parse(test_get_tokenstream());
|
||||
}
|
||||
@@ -277,7 +277,7 @@ int main(int argc, char** argv) {
|
||||
|
||||
// Free AST and TokenStream after each test
|
||||
if (s_currentModule) {
|
||||
parser_free(s_currentModule);
|
||||
ast_free_module(s_currentModule);
|
||||
s_currentModule = NULL;
|
||||
}
|
||||
if (s_currentTokenStream) {
|
||||
|
||||
Reference in New Issue
Block a user