Support variable declaration initializer

This commit is contained in:
2025-08-19 22:58:39 +02:00
parent 569139d44a
commit 0c2a396320
10 changed files with 175 additions and 102 deletions

View File

@@ -408,9 +408,10 @@ namespace elna::boot
return this;
}
variable_declaration::variable_declaration(const struct position position, identifier_definition identifier,
std::shared_ptr<type_expression> variable_type)
: declaration(position, identifier), m_variable_type(variable_type)
variable_declaration::variable_declaration(const struct position position,
std::vector<identifier_definition>&& identifier, std::shared_ptr<type_expression> variable_type,
expression *body)
: node(position), m_variable_type(variable_type), identifiers(std::move(identifier)), body(body)
{
}