This commit is contained in:
uan
2026-02-05 22:43:01 +01:00
parent 1581ca4928
commit a1c99b8b9e
2 changed files with 3 additions and 1 deletions

View File

@@ -638,6 +638,8 @@ fn (mut p Parser) parse_func_decl() FuncDecl {
else{parse_error("Expected function return type after name when declaring ${name_tok.text}")}
}
p.symbols.define_func(name_tok.text, type_tok.text, Block{})
block := p.parse_block(true)
return_stmts := p.get_return_stmts_recursive(block)