aboutsummaryrefslogtreecommitdiff
path: root/boot/semantic.cc
diff options
context:
space:
mode:
authorEugen Wissner <belka@caraus.de>2026-07-12 13:23:54 +0200
committerEugen Wissner <belka@caraus.de>2026-07-12 13:23:54 +0200
commit768537d6e4b82a19e77b7e44234309ecaf4d65d2 (patch)
treeab22613a16c3a914b16d00a5f988f51d1eadac0d /boot/semantic.cc
parent14d4977e2ab2409bb7344395ca01d19e49f130f1 (diff)
downloadelna-768537d6e4b82a19e77b7e44234309ecaf4d65d2.tar.gz
Remove unions
Diffstat (limited to 'boot/semantic.cc')
-rw-r--r--boot/semantic.cc20
1 files changed, 0 insertions, 20 deletions
diff --git a/boot/semantic.cc b/boot/semantic.cc
index df6e70e..29925c2 100644
--- a/boot/semantic.cc
+++ b/boot/semantic.cc
@@ -459,16 +459,6 @@ namespace elna::boot
return type(std::make_shared<pointer_type>(lookup_primitive_type("Char")));
}
}
- else if (auto composite = resolved_type.get<union_type>())
- {
- for (auto& field : composite->fields)
- {
- if (field.first == field_name)
- {
- return field.second;
- }
- }
- }
return type();
}
@@ -581,16 +571,6 @@ namespace elna::boot
this->current_type = type(result_type);
}
- void name_analysis_visitor::visit(union_type_expression *expression)
- {
- auto result_type = std::make_shared<union_type>();
-
- std::set<std::string> field_names;
- result_type->fields = build_composite_type(expression->fields, field_names);
-
- this->current_type = type(result_type);
- }
-
void name_analysis_visitor::visit(procedure_type_expression *expression)
{
std::shared_ptr<procedure_type> result_type =