Add f32 and f64 types
diff --git a/gen/write.rs b/gen/write.rs
index 9ab98fa..6ff04e5 100644
--- a/gen/write.rs
+++ b/gen/write.rs
@@ -86,7 +86,7 @@
Some(U8) | Some(U16) | Some(U32) | Some(U64) | Some(Usize) | Some(I8)
| Some(I16) | Some(I32) | Some(I64) | Some(Isize) => out.include.cstdint = true,
Some(CxxString) => out.include.string = true,
- Some(Bool) | Some(RustString) | None => {}
+ Some(Bool) | Some(F32) | Some(F64) | Some(RustString) | None => {}
},
Type::RustBox(_) => out.include.type_traits = true,
Type::UniquePtr(_) => out.include.memory = true,
@@ -446,6 +446,8 @@
Some(I32) => write!(out, "int32_t"),
Some(I64) => write!(out, "int64_t"),
Some(Isize) => write!(out, "ssize_t"),
+ Some(F32) => write!(out, "float"),
+ Some(F64) => write!(out, "double"),
Some(CxxString) => write!(out, "::std::string"),
Some(RustString) => write!(out, "::rust::String"),
None => write!(out, "{}", ident),
diff --git a/syntax/atom.rs b/syntax/atom.rs
index 9fb6554..0b3fd75 100644
--- a/syntax/atom.rs
+++ b/syntax/atom.rs
@@ -14,6 +14,8 @@
I32,
I64,
Isize,
+ F32,
+ F64,
CxxString,
RustString,
}
@@ -32,6 +34,8 @@
"i16" => Some(I16),
"i32" => Some(I32),
"i64" => Some(I64),
+ "f32" => Some(F32),
+ "f64" => Some(F64),
"isize" => Some(Isize),
"CxxString" => Some(CxxString),
"String" => Some(RustString),