From 768537d6e4b82a19e77b7e44234309ecaf4d65d2 Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Sun, 12 Jul 2026 13:23:54 +0200 Subject: Remove unions --- boot/ast.cc | 34 ---------------------------------- 1 file changed, 34 deletions(-) (limited to 'boot/ast.cc') diff --git a/boot/ast.cc b/boot/ast.cc index d0d19b7..fbecf11 100644 --- a/boot/ast.cc +++ b/boot/ast.cc @@ -39,11 +39,6 @@ namespace elna::boot __builtin_unreachable(); } - void empty_visitor::visit(union_type_expression *) - { - __builtin_unreachable(); - } - void empty_visitor::visit(procedure_type_expression *) { __builtin_unreachable(); @@ -391,14 +386,6 @@ namespace elna::boot } } - void walking_visitor::visit(union_type_expression *expression) - { - for (const field_declaration& field : expression->fields) - { - field.second->accept(this); - } - } - void walking_visitor::visit(procedure_type_expression *expression) { for (const field_declaration& field : expression->parameters) @@ -557,11 +544,6 @@ namespace elna::boot return nullptr; } - union_type_expression *type_expression::is_union() - { - return nullptr; - } - procedure_type_expression *type_expression::is_procedure() { return nullptr; @@ -646,22 +628,6 @@ namespace elna::boot return this; } - union_type_expression::union_type_expression(const struct position position, - std::vector&& fields) - : node(position), fields(std::move(fields)) - { - } - - void union_type_expression::accept(parser_visitor *visitor) - { - visitor->visit(this); - } - - union_type_expression *union_type_expression::is_union() - { - return this; - } - variable_declaration::variable_declaration(const struct position position, std::vector&& identifier, std::shared_ptr variable_type, expression *initializer) -- cgit v1.2.3