From 8dd16259287f58f9273002717ec4d27e97127719 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 12 Jun 2024 07:43:14 +0200 Subject: Merging upstream version 127.0. Signed-off-by: Daniel Baumann --- third_party/rust/wast/src/component/types.rs | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'third_party/rust/wast/src/component/types.rs') diff --git a/third_party/rust/wast/src/component/types.rs b/third_party/rust/wast/src/component/types.rs index 72eced02a8..dc8a91fd6b 100644 --- a/third_party/rust/wast/src/component/types.rs +++ b/third_party/rust/wast/src/component/types.rs @@ -230,8 +230,8 @@ pub enum PrimitiveValType { U32, S64, U64, - Float32, - Float64, + F32, + F64, Char, String, } @@ -266,12 +266,18 @@ impl<'a> Parse<'a> for PrimitiveValType { } else if l.peek::()? { parser.parse::()?; Ok(Self::U64) + } else if l.peek::()? { + parser.parse::()?; + Ok(Self::F32) + } else if l.peek::()? { + parser.parse::()?; + Ok(Self::F64) } else if l.peek::()? { parser.parse::()?; - Ok(Self::Float32) + Ok(Self::F32) } else if l.peek::()? { parser.parse::()?; - Ok(Self::Float64) + Ok(Self::F64) } else if l.peek::()? { parser.parse::()?; Ok(Self::Char) @@ -297,6 +303,8 @@ impl Peek for PrimitiveValType { | Some(("u32", _)) | Some(("s64", _)) | Some(("u64", _)) + | Some(("f32", _)) + | Some(("f64", _)) | Some(("float32", _)) | Some(("float64", _)) | Some(("char", _)) -- cgit v1.2.3