summaryrefslogtreecommitdiffstats
path: root/third_party/rust/wast/src/component/types.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:43:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:43:14 +0000
commit8dd16259287f58f9273002717ec4d27e97127719 (patch)
tree3863e62a53829a84037444beab3abd4ed9dfc7d0 /third_party/rust/wast/src/component/types.rs
parentReleasing progress-linux version 126.0.1-1~progress7.99u1. (diff)
downloadfirefox-8dd16259287f58f9273002717ec4d27e97127719.tar.xz
firefox-8dd16259287f58f9273002717ec4d27e97127719.zip
Merging upstream version 127.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/rust/wast/src/component/types.rs')
-rw-r--r--third_party/rust/wast/src/component/types.rs16
1 files changed, 12 insertions, 4 deletions
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::<kw::u64>()? {
parser.parse::<kw::u64>()?;
Ok(Self::U64)
+ } else if l.peek::<kw::f32>()? {
+ parser.parse::<kw::f32>()?;
+ Ok(Self::F32)
+ } else if l.peek::<kw::f64>()? {
+ parser.parse::<kw::f64>()?;
+ Ok(Self::F64)
} else if l.peek::<kw::float32>()? {
parser.parse::<kw::float32>()?;
- Ok(Self::Float32)
+ Ok(Self::F32)
} else if l.peek::<kw::float64>()? {
parser.parse::<kw::float64>()?;
- Ok(Self::Float64)
+ Ok(Self::F64)
} else if l.peek::<kw::char>()? {
parser.parse::<kw::char>()?;
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", _))