aboutsummaryrefslogtreecommitdiff
path: root/boot/name_analysis.cc
diff options
context:
space:
mode:
authorEugen Wissner <belka@caraus.de>2026-08-21 00:05:03 +0200
committerEugen Wissner <belka@caraus.de>2026-08-21 00:05:03 +0200
commit39269cc68a32f6e1a7524b00da36a1fe4cc7fb8b (patch)
tree9558cd6107d60e22127faeddbdeac5031ee2fdbe /boot/name_analysis.cc
parent4f77ad5d019618893c59a0f8d5bfa6b98e50a3be (diff)
downloadelna-39269cc68a32f6e1a7524b00da36a1fe4cc7fb8b.tar.gz
Implement Single and Double floats
Diffstat (limited to 'boot/name_analysis.cc')
-rw-r--r--boot/name_analysis.cc6
1 files changed, 4 insertions, 2 deletions
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<double> *literal)
+ void name_analysis_visitor::visit(literal<float_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();
}