From 39269cc68a32f6e1a7524b00da36a1fe4cc7fb8b Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Fri, 21 Aug 2026 00:05:03 +0200 Subject: Implement Single and Double floats --- boot/name_analysis.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'boot/name_analysis.cc') diff --git a/boot/name_analysis.cc b/boot/name_analysis.cc index 4b69f9c..1ad66a8 100644 --- a/boot/name_analysis.cc +++ b/boot/name_analysis.cc @@ -912,9 +912,11 @@ namespace elna::boot this->current_type = type(); } - void name_analysis_visitor::visit(literal *literal) + void name_analysis_visitor::visit(literal *literal) { - literal->type_decoration = lookup_primitive_type("Float"); + literal->type_decoration = literal->value.format() == float_literal::format_kind::binary32 + ? lookup_primitive_type("Single") + : lookup_primitive_type("Double"); this->current_type = type(); } -- cgit v1.2.3