passed local tests

This commit is contained in:
2024-08-14 14:41:02 +00:00
parent f11ff0693b
commit 746e5bae07
4 changed files with 54 additions and 18 deletions

View File

@ -257,6 +257,7 @@ std::any Visitor::visitClass_constructor(MXParser::Class_constructorContext *con
auto cur_scope = std::make_shared<FunctionScope>();
cur_scope->parent = nodetype_stk.back().second.get();
construct_func->current_scope = cur_scope;
construct_func->func_name = context->ID()->getText();
cur_scope->schema.return_type = "void";
nodetype_stk.push_back({ASTNodeType::Constructor, construct_func->current_scope});