Skip to content

Commit

Permalink
Accept f32/f64 as aliases for float32/float64.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
sunfishcode committed Jan 4, 2024
1 parent 3c4f2f3 commit b16e67e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/wit-parser/src/ast/lex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit b16e67e

Please sign in to comment.