Parser tests

Signed-off-by: CHatingPython <chatingpython@gmail.com>
This commit is contained in:
CHatingPython
2026-05-25 12:18:31 +02:00
committed by CHatingPython
parent 535b088f81
commit 2cf4ff90a5
5 changed files with 70 additions and 18 deletions
+1 -3
View File
@@ -55,9 +55,7 @@ ast::node_handle<ast::declaration_node> parser::parse_declaration() {
case token_t::Lbrace: {
ast::function_body_handle body = parse_body();
if (body.error()) return body;
return ast::node_handle<ast::function_declarartion_node>{ first.location(),
name,
std::move(body.move()) };
return ast::node_handle<ast::function_definition_node>{ first.location(), name, std::move(body) };
}
case token_t::Semicolon: {
m_peekBuffer.clear();