Fix parsing of functions
This commit is contained in:
parent
c314ca4cb7
commit
bdcd8838ee
@ -83,7 +83,7 @@ namespace parsing {
|
||||
|
||||
stream.m_position = inner.m_position;
|
||||
|
||||
auto fun = new AST::Function{ std::move(type), {}, "main", std::move(statements) };
|
||||
auto fun = new AST::Function{ std::move(type), {}, name_token.content, std::move(statements) };
|
||||
return new std::unique_ptr<AST::TopLevelStatement>{ fun };
|
||||
}
|
||||
catch (std::runtime_error error) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user