refactor(AST): improve function declaration AST node

Change p_name to be of type std::string instead of furc::token.
This commit is contained in:
2026-06-03 16:11:20 +02:00
parent 02ce25df2d
commit b68a559980
4 changed files with 19 additions and 13 deletions
+2 -1
View File
@@ -5,6 +5,7 @@
#include "furc/ast/literal.hpp" // IWYU pragma: keep
#include "furc/ast/statement.hpp" // IWYU pragma: keep
#include <cassert>
#include <iostream>
namespace furc::front {
@@ -14,7 +15,7 @@ namespace ir = furlang::ir;
}
void ir_generator::visit(const ast::function_definition_node& funcDef) {
m_currentFunction = std::make_unique<furlang::ir::function>(std::string(funcDef.name()->string));
m_currentFunction = std::make_unique<furlang::ir::function>(std::string(funcDef.name()));
push_block();
if (funcDef.body().has_error()) {