From b16e67e9c3521d596d625127e4db83b488c6e790 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Thu, 4 Jan 2024 12:05:36 -0800 Subject: [PATCH] Accept `f32`/`f64` as aliases for `float32`/`float64`. In WebAssembly/component-model#277 there seems to be consensus emerging to rename `float32`/`float64` to `f32`/`f64`. This PR just adds support for parsing `f32`/`f64`, and changes nothing else for now, to start preparing for this change. --- crates/wit-parser/src/ast/lex.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/wit-parser/src/ast/lex.rs b/crates/wit-parser/src/ast/lex.rs index fde7f3d4e6..c300392f53 100644 --- a/crates/wit-parser/src/ast/lex.rs +++ b/crates/wit-parser/src/ast/lex.rs @@ -285,8 +285,8 @@ impl<'a> Tokenizer<'a> { "s16" => S16, "s32" => S32, "s64" => S64, - "float32" => Float32, - "float64" => Float64, + "f32" | "float32" => Float32, + "f64" | "float64" => Float64, "char" => Char, "resource" => Resource, "own" => Own,