Add f16
and f128
to the AST
This commit is contained in:
parent
02778b3e0e
commit
baba49d8f0
2 changed files with 8 additions and 0 deletions
|
@ -1909,22 +1909,28 @@ pub struct FnSig {
|
|||
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
|
||||
#[derive(Encodable, Decodable, HashStable_Generic)]
|
||||
pub enum FloatTy {
|
||||
F16,
|
||||
F32,
|
||||
F64,
|
||||
F128,
|
||||
}
|
||||
|
||||
impl FloatTy {
|
||||
pub fn name_str(self) -> &'static str {
|
||||
match self {
|
||||
FloatTy::F16 => "f16",
|
||||
FloatTy::F32 => "f32",
|
||||
FloatTy::F64 => "f64",
|
||||
FloatTy::F128 => "f128",
|
||||
}
|
||||
}
|
||||
|
||||
pub fn name(self) -> Symbol {
|
||||
match self {
|
||||
FloatTy::F16 => sym::f16,
|
||||
FloatTy::F32 => sym::f32,
|
||||
FloatTy::F64 => sym::f64,
|
||||
FloatTy::F128 => sym::f128,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue