diff options
| author | Eugen Wissner <belka@caraus.de> | 2026-08-21 00:05:03 +0200 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2026-08-21 00:05:03 +0200 |
| commit | 39269cc68a32f6e1a7524b00da36a1fe4cc7fb8b (patch) | |
| tree | 9558cd6107d60e22127faeddbdeac5031ee2fdbe /boot/name_analysis.cc | |
| parent | 4f77ad5d019618893c59a0f8d5bfa6b98e50a3be (diff) | |
| download | elna-39269cc68a32f6e1a7524b00da36a1fe4cc7fb8b.tar.gz | |
Implement Single and Double floats
Diffstat (limited to 'boot/name_analysis.cc')
| -rw-r--r-- | boot/name_analysis.cc | 6 |
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(); } |
