[banjo] Add support for more types of constants.
In addition, a validation step post-constant ast parsing was added to
validate constant types are correct.
Tested: fx run-host-tests banjo_host_tests
Change-Id: If67c4a7e694909fa3a18374662fe83ed7078790c
diff --git a/garnet/bin/banjo/src/ast.rs b/garnet/bin/banjo/src/ast.rs
index a2bfe41..e1f90e8 100644
--- a/garnet/bin/banjo/src/ast.rs
+++ b/garnet/bin/banjo/src/ast.rs
@@ -7,10 +7,9 @@
failure::Fail,
pest::iterators::{Pair, Pairs},
serde_derive::Serialize,
+ std::collections::{BTreeMap, HashMap, HashSet, VecDeque},
std::fmt,
- std::{
- collections::{BTreeMap, HashMap, HashSet, VecDeque},
- },
+ std::str::FromStr,
};
#[derive(Debug, Fail)]
@@ -29,6 +28,8 @@
NotAnInteger(Rule),
#[fail(display = "Invalid dependencies: {}", 0)]
InvalidDeps(String),
+ #[fail(display = "Expected {:?} to resolve to a {:?}.", 0, 1)]
+ InvalidConstType(Constant, Ty),
}
#[derive(PartialEq, Eq, Serialize, Default, Debug, Hash)]
@@ -119,10 +120,12 @@
attrs.0.push(Attr { key: String::from(ap.trim()), val: None });
} else {
let split: Vec<&str> = ap.split("=").collect();
- attrs.0.push(Attr {
- key: String::from(split[0].trim()),
- val: Some(String::from(split[1])),
- });
+ // Strip whitespace and quotes.
+ let val = split[1].trim();
+ let val = val.chars().skip(1).take(val.len() - 2).collect();
+ attrs
+ .0
+ .push(Attr { key: String::from(split[0].trim()), val: Some(val) });
}
}
}
@@ -166,6 +169,7 @@
Timer,
Bti,
Profile,
+ DebugLog,
}
#[derive(PartialEq, Eq, Clone, Serialize, Debug, Hash)]
@@ -267,6 +271,7 @@
"timer" => HandleTy::Timer,
"bti" => HandleTy::Bti,
"profile" => HandleTy::Profile,
+ "debuglog" => HandleTy::DebugLog,
_e => {
return Err(ParseError::UnrecognizedType(
inner_pair.as_str().to_string(),
@@ -367,6 +372,7 @@
pub attributes: Attrs,
pub ty: Ty,
pub ident: Ident,
+ pub val: Option<Constant>,
}
impl StructField {
@@ -374,21 +380,21 @@
let mut attributes = Attrs::default();
let mut ty = None;
let mut ident = String::default();
+ let mut val = None;
for inner_pair in pair.into_inner() {
match inner_pair.as_rule() {
- Rule::attributes => {
- attributes = Attrs::from_pair(inner_pair)?;
- }
- Rule::ident => {
- ident = String::from(inner_pair.as_str());
- }
- _ => {
- ty = Some(Ty::from_pair(&inner_pair)?);
- }
- }
+ Rule::attributes => attributes = Attrs::from_pair(inner_pair)?,
+ Rule::ident => ident = String::from(inner_pair.as_str()),
+ Rule::constant => val = Some(Constant::from_str(inner_pair.as_str())),
+ _ => ty = Some(Ty::from_pair(&inner_pair)?),
+ };
}
- // TODO use the val field in structs
- Ok(StructField { attributes: attributes, ty: ty.unwrap(), ident: Ident::new(ident.as_str()) })
+ Ok(StructField {
+ attributes: attributes,
+ ty: ty.unwrap(),
+ ident: Ident::new(ident.as_str()),
+ val: val,
+ })
}
}
@@ -538,10 +544,15 @@
return Ty::Union;
}
}
- Decl::Enum { name, .. } => {
+ Decl::Enum { name, variants, .. } => {
if *name == ident {
return Ty::Enum;
}
+ for variant in variants.iter() {
+ if variant.name == ident {
+ return Ty::Identifier { id: Ident::new(name), reference: false };
+ }
+ }
}
Decl::Alias(to, from) => {
if to == fq_ident {
@@ -849,6 +860,73 @@
Ok(())
}
+ // Validates that the constants are of the right type.
+ fn validate_constants(&self) -> Result<(), ParseError> {
+ // Search ast for constants.
+ for (ty, constant) in
+ self.namespaces.iter().flat_map(|(_, decls)| decls.iter()).filter_map(|decl| match decl
+ {
+ Decl::Constant { ty, value, .. } => Some((ty, value)),
+ _ => None,
+ })
+ {
+ let Constant(string) = constant;
+ match ty {
+ Ty::Int8 => {
+ i8::from_str(string)
+ .map_err(|_| ParseError::InvalidConstType(constant.clone(), ty.clone()))?;
+ }
+ Ty::Int16 => {
+ i16::from_str(string)
+ .map_err(|_| ParseError::InvalidConstType(constant.clone(), ty.clone()))?;
+ }
+ Ty::Int32 => {
+ i32::from_str(string)
+ .map_err(|_| ParseError::InvalidConstType(constant.clone(), ty.clone()))?;
+ }
+ Ty::Int64 => {
+ i64::from_str(string)
+ .map_err(|_| ParseError::InvalidConstType(constant.clone(), ty.clone()))?;
+ }
+ Ty::USize => {
+ usize::from_str(string)
+ .map_err(|_| ParseError::InvalidConstType(constant.clone(), ty.clone()))?;
+ }
+ Ty::UInt8 => {
+ u8::from_str(string)
+ .map_err(|_| ParseError::InvalidConstType(constant.clone(), ty.clone()))?;
+ }
+ Ty::UInt16 => {
+ u16::from_str(string)
+ .map_err(|_| ParseError::InvalidConstType(constant.clone(), ty.clone()))?;
+ }
+ Ty::UInt32 | Ty::UInt64 => {
+ u32::from_str(string)
+ .map_err(|_| ParseError::InvalidConstType(constant.clone(), ty.clone()))?;
+ }
+ Ty::Bool => {
+ bool::from_str(string)
+ .map_err(|_| ParseError::InvalidConstType(constant.clone(), ty.clone()))?;
+ }
+ Ty::Str { .. } => {
+ if !string.starts_with("\"") || !string.ends_with("\"") {
+ return Err(ParseError::InvalidConstType(constant.clone(), ty.clone()));
+ }
+ }
+ _ => {
+ let ident_ty = self.id_to_type(&Ident::new(string));
+ if *ty != ident_ty {
+ return Err(ParseError::InvalidConstType(constant.clone(), ty.clone()));
+ }
+ }
+ };
+ }
+
+ // TODO(surajmalhotra): Find every bound array, string, and validate their bound is a valid
+ // usize.
+ Ok(())
+ }
+
pub fn parse(pair_vec: Vec<Pairs<'_, Rule>>) -> Result<Self, ParseError> {
let mut primary_namespace = None;
let mut namespaces = BTreeMap::default();
@@ -914,6 +992,7 @@
let ast = BanjoAst { primary_namespace: primary_namespace.unwrap(), namespaces };
ast.validate_declaration_deps()?;
+ ast.validate_constants()?;
Ok(ast)
}
diff --git a/garnet/bin/banjo/src/backends/c.rs b/garnet/bin/banjo/src/backends/c.rs
index 8551948..881c737 100644
--- a/garnet/bin/banjo/src/backends/c.rs
+++ b/garnet/bin/banjo/src/backends/c.rs
@@ -102,7 +102,7 @@
fn not_callback(ast: &ast::BanjoAst, id: &Ident) -> bool {
if let Some(attributes) = ast.id_to_attributes(id) {
if let Some(layout) = attributes.get_attribute("Layout") {
- if layout == " \"ddk-callback\"" {
+ if layout == "ddk-callback" {
return false;
}
}
@@ -121,6 +121,7 @@
ast::Ty::UInt16 => String::from(format!("UINT16_C({})", size)),
ast::Ty::UInt32 => String::from(format!("UINT32_C({})", size)),
ast::Ty::UInt64 => String::from(format!("UINT64_C({})", size)),
+ ast::Ty::USize | ast::Ty::Bool | ast::Ty::Str { .. } => size.clone(),
s => panic!("don't handles this sized const: {}", s),
}
}
@@ -324,7 +325,7 @@
) -> Option<(&'a String, &'a Vec<ast::Method>, &'a ast::Attrs)> {
if let ast::Decl::Interface { ref name, ref methods, ref attributes } = *decl {
if let Some(layout) = attributes.get_attribute("Layout") {
- if layout == "\"ddk-interface\"" {
+ if layout == "ddk-interface" {
return Some((name, methods, attributes));
}
}
@@ -338,7 +339,7 @@
) -> Option<(&'a String, &'a Vec<ast::Method>, &'a ast::Attrs)> {
if let ast::Decl::Interface { ref name, ref methods, ref attributes } = *decl {
if let Some(layout) = attributes.get_attribute("Layout") {
- if layout == "\"ddk-callback\"" || layout == "\"ddk-interface\"" {
+ if layout == "ddk-callback" || layout == "ddk-interface" {
None
} else {
Some((name, methods, attributes))
diff --git a/garnet/bin/banjo/src/backends/cpp.rs b/garnet/bin/banjo/src/backends/cpp.rs
index 87cf2c1..b89b698e 100644
--- a/garnet/bin/banjo/src/backends/cpp.rs
+++ b/garnet/bin/banjo/src/backends/cpp.rs
@@ -71,6 +71,7 @@
ast::HandleTy::Timer => Ok(String::from("zx::timer")),
ast::HandleTy::Bti => Ok(String::from("zx::bti")),
ast::HandleTy::Profile => Ok(String::from("zx::profile")),
+ ast::HandleTy::DebugLog => Ok(String::from("zx::debuglog")),
}
}
@@ -124,7 +125,7 @@
fn not_callback(ast: &ast::BanjoAst, id: &Ident) -> bool {
if let Some(attributes) = ast.id_to_attributes(id) {
if let Some(layout) = attributes.get_attribute("Layout") {
- if layout == " \"ddk-callback\"" {
+ if layout == "ddk-callback" {
return false;
}
}
@@ -349,7 +350,7 @@
) -> Option<(&'a String, &'a Vec<ast::Method>, &'a ast::Attrs)> {
if let ast::Decl::Interface { ref name, ref methods, ref attributes } = *decl {
if let Some(layout) = attributes.get_attribute("Layout") {
- if layout == " \"ddk-interface\"" {
+ if layout == "ddk-interface" {
return Some((name, methods, attributes));
}
}
@@ -363,7 +364,7 @@
) -> Option<(&'a String, &'a Vec<ast::Method>, &'a ast::Attrs)> {
if let ast::Decl::Interface { ref name, ref methods, ref attributes } = *decl {
if let Some(layout) = attributes.get_attribute("Layout") {
- if layout == " \"ddk-protocol\"" {
+ if layout == "ddk-protocol" {
return Some((name, methods, attributes));
}
} else {
diff --git a/garnet/bin/banjo/src/parser.rs b/garnet/bin/banjo/src/parser.rs
index 6c32bc0..87cc1f9 100644
--- a/garnet/bin/banjo/src/parser.rs
+++ b/garnet/bin/banjo/src/parser.rs
@@ -31,7 +31,7 @@
attributes = !{ (doc_comment_block)? ~ (attribute_list)? }
struct_declaration = { attributes ~ "struct" ~ ident ~ "{" ~ (struct_field ~ ";")* ~ "}" }
-struct_field = { attributes? ~ type_ ~ ident ~ ("=" ~ ident)? }
+struct_field = { attributes? ~ type_ ~ ident ~ ("=" ~ constant)? }
union_declaration = { attributes ~ "union" ~ ident ~ "{" ~ (union_field ~ ";")* ~ "}" }
union_field = { attributes? ~ type_ ~ ident }
@@ -68,15 +68,15 @@
handle_subtype = { "process" | "thread" | "vmo" | "channel" | "eventpair" | "port" |
"interrupt" | "debuglog" | "socket" | "resource" | "event" |
- "job" | "vmar" | "fifo" | "guest" | "timer" | "bti" }
+ "job" | "vmar" | "fifo" | "guest" | "timer" | "bti" | "profile" }
compound_ident = ${ ident ~ ("." ~ ident)* }
-ident = { ("@")? ~ (alpha | digit| "_")+ }
+ident = { ("@")? ~ (alpha | digit | "_")+ }
alpha = { 'a'..'z' | 'A'..'Z' }
digit = { '0'..'9' }
string = { "\"" ~ ("-" | SYMBOL | alpha)* ~ "\"" }
numeric = { ("-" | digit)* }
-constant = { compound_ident | numeric }
+constant = { compound_ident | string | numeric }
reference = { "?" }
"#]
pub struct BanjoParser;
diff --git a/garnet/bin/banjo/test/ast/alignment.test.ast b/garnet/bin/banjo/test/ast/alignment.test.ast
index f565b81..c8ed3a8 100644
--- a/garnet/bin/banjo/test/ast/alignment.test.ast
+++ b/garnet/bin/banjo/test/ast/alignment.test.ast
@@ -16,7 +16,8 @@
ident: Ident {
namespace: None,
name: "i16_0"
- }
+ },
+ val: None
},
StructField {
attributes: Attrs(
@@ -26,7 +27,8 @@
ident: Ident {
namespace: None,
name: "i32_0"
- }
+ },
+ val: None
},
StructField {
attributes: Attrs(
@@ -36,7 +38,8 @@
ident: Ident {
namespace: None,
name: "i16_1"
- }
+ },
+ val: None
}
]
},
@@ -54,7 +57,8 @@
ident: Ident {
namespace: None,
name: "i16_0"
- }
+ },
+ val: None
},
StructField {
attributes: Attrs(
@@ -64,7 +68,8 @@
ident: Ident {
namespace: None,
name: "i8_0"
- }
+ },
+ val: None
},
StructField {
attributes: Attrs(
@@ -74,7 +79,8 @@
ident: Ident {
namespace: None,
name: "i16_1"
- }
+ },
+ val: None
},
StructField {
attributes: Attrs(
@@ -84,7 +90,8 @@
ident: Ident {
namespace: None,
name: "i8_1"
- }
+ },
+ val: None
}
]
},
@@ -102,7 +109,8 @@
ident: Ident {
namespace: None,
name: "i16_0"
- }
+ },
+ val: None
},
StructField {
attributes: Attrs(
@@ -112,7 +120,8 @@
ident: Ident {
namespace: None,
name: "i8_0"
- }
+ },
+ val: None
},
StructField {
attributes: Attrs(
@@ -122,7 +131,8 @@
ident: Ident {
namespace: None,
name: "i8_1"
- }
+ },
+ val: None
},
StructField {
attributes: Attrs(
@@ -132,7 +142,8 @@
ident: Ident {
namespace: None,
name: "i16_1"
- }
+ },
+ val: None
}
]
},
@@ -150,7 +161,8 @@
ident: Ident {
namespace: None,
name: "i32_0"
- }
+ },
+ val: None
},
StructField {
attributes: Attrs(
@@ -160,7 +172,8 @@
ident: Ident {
namespace: None,
name: "i64_0"
- }
+ },
+ val: None
},
StructField {
attributes: Attrs(
@@ -170,7 +183,8 @@
ident: Ident {
namespace: None,
name: "i16_0"
- }
+ },
+ val: None
},
StructField {
attributes: Attrs(
@@ -180,7 +194,8 @@
ident: Ident {
namespace: None,
name: "i32_1"
- }
+ },
+ val: None
},
StructField {
attributes: Attrs(
@@ -190,7 +205,8 @@
ident: Ident {
namespace: None,
name: "i16_1"
- }
+ },
+ val: None
}
]
}
diff --git a/garnet/bin/banjo/test/ast/example-0.test.ast b/garnet/bin/banjo/test/ast/example-0.test.ast
index 173bbba..331c96b 100644
--- a/garnet/bin/banjo/test/ast/example-0.test.ast
+++ b/garnet/bin/banjo/test/ast/example-0.test.ast
@@ -22,7 +22,8 @@
ident: Ident {
namespace: None,
name: "b"
- }
+ },
+ val: None
}
]
},
@@ -46,7 +47,8 @@
ident: Ident {
namespace: None,
name: "f"
- }
+ },
+ val: None
}
]
}
diff --git a/garnet/bin/banjo/test/ast/example-1.test.ast b/garnet/bin/banjo/test/ast/example-1.test.ast
index e36a622..fec6a45 100644
--- a/garnet/bin/banjo/test/ast/example-1.test.ast
+++ b/garnet/bin/banjo/test/ast/example-1.test.ast
@@ -16,7 +16,8 @@
ident: Ident {
namespace: None,
name: "x"
- }
+ },
+ val: None
},
StructField {
attributes: Attrs(
@@ -26,7 +27,8 @@
ident: Ident {
namespace: None,
name: "y"
- }
+ },
+ val: None
}
]
}
diff --git a/garnet/bin/banjo/test/ast/example-2.test.ast b/garnet/bin/banjo/test/ast/example-2.test.ast
index a834fff..5d79052 100644
--- a/garnet/bin/banjo/test/ast/example-2.test.ast
+++ b/garnet/bin/banjo/test/ast/example-2.test.ast
@@ -16,7 +16,8 @@
ident: Ident {
namespace: None,
name: "x"
- }
+ },
+ val: None
},
StructField {
attributes: Attrs(
@@ -26,7 +27,8 @@
ident: Ident {
namespace: None,
name: "y"
- }
+ },
+ val: None
}
]
}
diff --git a/garnet/bin/banjo/test/ast/example-3.test.ast b/garnet/bin/banjo/test/ast/example-3.test.ast
index e6204c7..0f768dc 100644
--- a/garnet/bin/banjo/test/ast/example-3.test.ast
+++ b/garnet/bin/banjo/test/ast/example-3.test.ast
@@ -16,7 +16,8 @@
ident: Ident {
namespace: None,
name: "x"
- }
+ },
+ val: None
},
StructField {
attributes: Attrs(
@@ -26,7 +27,8 @@
ident: Ident {
namespace: None,
name: "y"
- }
+ },
+ val: None
}
]
}
diff --git a/garnet/bin/banjo/test/ast/example-4.test.ast b/garnet/bin/banjo/test/ast/example-4.test.ast
index e6417a4..723ef25 100644
--- a/garnet/bin/banjo/test/ast/example-4.test.ast
+++ b/garnet/bin/banjo/test/ast/example-4.test.ast
@@ -16,7 +16,8 @@
ident: Ident {
namespace: None,
name: "x"
- }
+ },
+ val: None
}
]
},
@@ -44,7 +45,7 @@
Attr {
key: "Layout",
val: Some(
- " \"ddk-protocol\""
+ "ddk-protocol"
)
}
]
diff --git a/garnet/bin/banjo/test/ast/example-8.test.ast b/garnet/bin/banjo/test/ast/example-8.test.ast
index 64e8906..f7c6ef1 100644
--- a/garnet/bin/banjo/test/ast/example-8.test.ast
+++ b/garnet/bin/banjo/test/ast/example-8.test.ast
@@ -16,7 +16,8 @@
ident: Ident {
namespace: None,
name: "u8_0"
- }
+ },
+ val: None
},
StructField {
attributes: Attrs(
@@ -26,7 +27,8 @@
ident: Ident {
namespace: None,
name: "u64_0"
- }
+ },
+ val: None
},
StructField {
attributes: Attrs(
@@ -36,7 +38,8 @@
ident: Ident {
namespace: None,
name: "u8_1"
- }
+ },
+ val: None
}
]
}
diff --git a/garnet/bin/banjo/test/ast/example-9.test.ast b/garnet/bin/banjo/test/ast/example-9.test.ast
index 1a62f57..11da805 100644
--- a/garnet/bin/banjo/test/ast/example-9.test.ast
+++ b/garnet/bin/banjo/test/ast/example-9.test.ast
@@ -43,7 +43,8 @@
ident: Ident {
namespace: None,
name: "first"
- }
+ },
+ val: None
},
StructField {
attributes: Attrs(
@@ -53,7 +54,8 @@
ident: Ident {
namespace: None,
name: "second"
- }
+ },
+ val: None
}
]
},
diff --git a/garnet/bin/banjo/test/ast/point.test.ast b/garnet/bin/banjo/test/ast/point.test.ast
index da36fbd..732a331 100644
--- a/garnet/bin/banjo/test/ast/point.test.ast
+++ b/garnet/bin/banjo/test/ast/point.test.ast
@@ -16,7 +16,8 @@
ident: Ident {
namespace: None,
name: "x"
- }
+ },
+ val: None
},
StructField {
attributes: Attrs(
@@ -26,7 +27,8 @@
ident: Ident {
namespace: None,
name: "y"
- }
+ },
+ val: None
}
]
}
diff --git a/garnet/bin/banjo/test/ast/simple.test.ast b/garnet/bin/banjo/test/ast/simple.test.ast
index 48afd61..174a26b 100644
--- a/garnet/bin/banjo/test/ast/simple.test.ast
+++ b/garnet/bin/banjo/test/ast/simple.test.ast
@@ -16,7 +16,8 @@
ident: Ident {
namespace: None,
name: "x"
- }
+ },
+ val: None
},
StructField {
attributes: Attrs(
@@ -26,7 +27,8 @@
ident: Ident {
namespace: None,
name: "y"
- }
+ },
+ val: None
}
]
},
@@ -81,7 +83,7 @@
Attr {
key: "Layout",
val: Some(
- " \"Simple\""
+ "Simple"
)
}
]
diff --git a/garnet/bin/banjo/test/ast/tables.test.ast b/garnet/bin/banjo/test/ast/tables.test.ast
index 874d100..ae79410 100644
--- a/garnet/bin/banjo/test/ast/tables.test.ast
+++ b/garnet/bin/banjo/test/ast/tables.test.ast
@@ -22,7 +22,8 @@
ident: Ident {
namespace: None,
name: "foo"
- }
+ },
+ val: None
}
]
},
@@ -46,7 +47,8 @@
ident: Ident {
namespace: None,
name: "bar"
- }
+ },
+ val: None
}
]
},
@@ -67,7 +69,8 @@
ident: Ident {
namespace: None,
name: "baz"
- }
+ },
+ val: None
}
]
},
@@ -91,7 +94,8 @@
ident: Ident {
namespace: None,
name: "qux"
- }
+ },
+ val: None
}
]
}
diff --git a/garnet/bin/banjo/test/ast/types.test.ast b/garnet/bin/banjo/test/ast/types.test.ast
new file mode 100644
index 0000000..7d953a3
--- /dev/null
+++ b/garnet/bin/banjo/test/ast/types.test.ast
@@ -0,0 +1,4587 @@
+BanjoAst {
+ primary_namespace: "banjo.examples.types",
+ namespaces: {
+ "banjo.examples.types": [
+ Struct {
+ attributes: Attrs(
+ []
+ ),
+ name: "this_is_a_struct",
+ fields: [
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Str {
+ size: None,
+ nullable: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "s"
+ },
+ val: None
+ }
+ ]
+ },
+ Union {
+ attributes: Attrs(
+ []
+ ),
+ name: "this_is_a_union",
+ fields: [
+ UnionField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Str {
+ size: None,
+ nullable: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "s"
+ }
+ }
+ ]
+ },
+ Interface {
+ attributes: Attrs(
+ []
+ ),
+ name: "this_is_an_interface",
+ methods: [
+ Method {
+ attributes: Attrs(
+ []
+ ),
+ name: "Copy",
+ in_params: [
+ (
+ "s",
+ Str {
+ size: None,
+ nullable: false
+ }
+ ),
+ (
+ "count",
+ UInt32
+ )
+ ],
+ out_params: [
+ (
+ "s",
+ Str {
+ size: None,
+ nullable: false
+ }
+ )
+ ]
+ }
+ ]
+ },
+ Struct {
+ attributes: Attrs(
+ []
+ ),
+ name: "interfaces",
+ fields: [
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Identifier {
+ id: Ident {
+ namespace: None,
+ name: "this_is_an_interface"
+ },
+ reference: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "nonnullable_interface"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Identifier {
+ id: Ident {
+ namespace: None,
+ name: "this_is_an_interface"
+ },
+ reference: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "nullable_interface"
+ },
+ val: None
+ }
+ ]
+ },
+ Struct {
+ attributes: Attrs(
+ []
+ ),
+ name: "primitive_types",
+ fields: [
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Bool,
+ ident: Ident {
+ namespace: None,
+ name: "b"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Int8,
+ ident: Ident {
+ namespace: None,
+ name: "i8"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Int16,
+ ident: Ident {
+ namespace: None,
+ name: "i16"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Int32,
+ ident: Ident {
+ namespace: None,
+ name: "i32"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Int64,
+ ident: Ident {
+ namespace: None,
+ name: "i64"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: UInt8,
+ ident: Ident {
+ namespace: None,
+ name: "u8"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: UInt16,
+ ident: Ident {
+ namespace: None,
+ name: "u16"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: UInt32,
+ ident: Ident {
+ namespace: None,
+ name: "u32"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: UInt64,
+ ident: Ident {
+ namespace: None,
+ name: "u64"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Float32,
+ ident: Ident {
+ namespace: None,
+ name: "f32"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Float64,
+ ident: Ident {
+ namespace: None,
+ name: "f64"
+ },
+ val: None
+ }
+ ]
+ },
+ Struct {
+ attributes: Attrs(
+ []
+ ),
+ name: "default_values",
+ fields: [
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Bool,
+ ident: Ident {
+ namespace: None,
+ name: "b1"
+ },
+ val: Some(
+ Constant(
+ "true"
+ )
+ )
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Bool,
+ ident: Ident {
+ namespace: None,
+ name: "b2"
+ },
+ val: Some(
+ Constant(
+ "false"
+ )
+ )
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Int8,
+ ident: Ident {
+ namespace: None,
+ name: "i8"
+ },
+ val: Some(
+ Constant(
+ "-23"
+ )
+ )
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Int16,
+ ident: Ident {
+ namespace: None,
+ name: "i16"
+ },
+ val: Some(
+ Constant(
+ "34"
+ )
+ )
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Int32,
+ ident: Ident {
+ namespace: None,
+ name: "i32"
+ },
+ val: Some(
+ Constant(
+ "-34595"
+ )
+ )
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Int64,
+ ident: Ident {
+ namespace: None,
+ name: "i64"
+ },
+ val: Some(
+ Constant(
+ "3948038"
+ )
+ )
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: UInt8,
+ ident: Ident {
+ namespace: None,
+ name: "u8"
+ },
+ val: Some(
+ Constant(
+ "0"
+ )
+ )
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: UInt16,
+ ident: Ident {
+ namespace: None,
+ name: "u16"
+ },
+ val: Some(
+ Constant(
+ "348"
+ )
+ )
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: UInt32,
+ ident: Ident {
+ namespace: None,
+ name: "u32"
+ },
+ val: Some(
+ Constant(
+ "9038"
+ )
+ )
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: UInt64,
+ ident: Ident {
+ namespace: None,
+ name: "u64"
+ },
+ val: Some(
+ Constant(
+ "19835"
+ )
+ )
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Str {
+ size: None,
+ nullable: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "s "
+ },
+ val: Some(
+ Constant(
+ "\"hello\""
+ )
+ )
+ }
+ ]
+ },
+ Constant {
+ attributes: Attrs(
+ []
+ ),
+ name: "arrays_size",
+ ty: UInt32,
+ value: Constant(
+ "32"
+ )
+ },
+ Struct {
+ attributes: Attrs(
+ []
+ ),
+ name: "arrays",
+ fields: [
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Array {
+ ty: Bool,
+ size: Constant(
+ "1"
+ )
+ },
+ ident: Ident {
+ namespace: None,
+ name: "b_0"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Array {
+ ty: Int8,
+ size: Constant(
+ "1"
+ )
+ },
+ ident: Ident {
+ namespace: None,
+ name: "i8_0"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Array {
+ ty: Int16,
+ size: Constant(
+ "1"
+ )
+ },
+ ident: Ident {
+ namespace: None,
+ name: "i16_0"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Array {
+ ty: Int32,
+ size: Constant(
+ "1"
+ )
+ },
+ ident: Ident {
+ namespace: None,
+ name: "i32_0"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Array {
+ ty: Int64,
+ size: Constant(
+ "1"
+ )
+ },
+ ident: Ident {
+ namespace: None,
+ name: "i64_0"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Array {
+ ty: UInt8,
+ size: Constant(
+ "1"
+ )
+ },
+ ident: Ident {
+ namespace: None,
+ name: "u8_0"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Array {
+ ty: UInt16,
+ size: Constant(
+ "1"
+ )
+ },
+ ident: Ident {
+ namespace: None,
+ name: "u16_0"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Array {
+ ty: UInt32,
+ size: Constant(
+ "1"
+ )
+ },
+ ident: Ident {
+ namespace: None,
+ name: "u32_0"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Array {
+ ty: UInt64,
+ size: Constant(
+ "1"
+ )
+ },
+ ident: Ident {
+ namespace: None,
+ name: "u64_0"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Array {
+ ty: Float32,
+ size: Constant(
+ "1"
+ )
+ },
+ ident: Ident {
+ namespace: None,
+ name: "f32_0"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Array {
+ ty: Float64,
+ size: Constant(
+ "1"
+ )
+ },
+ ident: Ident {
+ namespace: None,
+ name: "f64_0"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Array {
+ ty: Handle {
+ ty: Handle,
+ reference: false
+ },
+ size: Constant(
+ "1"
+ )
+ },
+ ident: Ident {
+ namespace: None,
+ name: "handle_0"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Array {
+ ty: Bool,
+ size: Constant(
+ "arrays_size"
+ )
+ },
+ ident: Ident {
+ namespace: None,
+ name: "b_1"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Array {
+ ty: Int8,
+ size: Constant(
+ "arrays_size"
+ )
+ },
+ ident: Ident {
+ namespace: None,
+ name: "i8_1"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Array {
+ ty: Int16,
+ size: Constant(
+ "arrays_size"
+ )
+ },
+ ident: Ident {
+ namespace: None,
+ name: "i16_1"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Array {
+ ty: Int32,
+ size: Constant(
+ "arrays_size"
+ )
+ },
+ ident: Ident {
+ namespace: None,
+ name: "i32_1"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Array {
+ ty: Int64,
+ size: Constant(
+ "arrays_size"
+ )
+ },
+ ident: Ident {
+ namespace: None,
+ name: "i64_1"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Array {
+ ty: UInt8,
+ size: Constant(
+ "arrays_size"
+ )
+ },
+ ident: Ident {
+ namespace: None,
+ name: "u8_1"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Array {
+ ty: UInt16,
+ size: Constant(
+ "arrays_size"
+ )
+ },
+ ident: Ident {
+ namespace: None,
+ name: "u16_1"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Array {
+ ty: UInt32,
+ size: Constant(
+ "arrays_size"
+ )
+ },
+ ident: Ident {
+ namespace: None,
+ name: "u32_1"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Array {
+ ty: UInt64,
+ size: Constant(
+ "arrays_size"
+ )
+ },
+ ident: Ident {
+ namespace: None,
+ name: "u64_1"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Array {
+ ty: Float32,
+ size: Constant(
+ "arrays_size"
+ )
+ },
+ ident: Ident {
+ namespace: None,
+ name: "f32_1"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Array {
+ ty: Float64,
+ size: Constant(
+ "arrays_size"
+ )
+ },
+ ident: Ident {
+ namespace: None,
+ name: "f64_1"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Array {
+ ty: Handle {
+ ty: Handle,
+ reference: false
+ },
+ size: Constant(
+ "arrays_size"
+ )
+ },
+ ident: Ident {
+ namespace: None,
+ name: "handle_1"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Array {
+ ty: Array {
+ ty: Bool,
+ size: Constant(
+ "4"
+ )
+ },
+ size: Constant(
+ "arrays_size"
+ )
+ },
+ ident: Ident {
+ namespace: None,
+ name: "b_2"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Array {
+ ty: Array {
+ ty: Int8,
+ size: Constant(
+ "4"
+ )
+ },
+ size: Constant(
+ "arrays_size"
+ )
+ },
+ ident: Ident {
+ namespace: None,
+ name: "i8_2"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Array {
+ ty: Array {
+ ty: Int16,
+ size: Constant(
+ "4"
+ )
+ },
+ size: Constant(
+ "arrays_size"
+ )
+ },
+ ident: Ident {
+ namespace: None,
+ name: "i16_2"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Array {
+ ty: Array {
+ ty: Int32,
+ size: Constant(
+ "4"
+ )
+ },
+ size: Constant(
+ "arrays_size"
+ )
+ },
+ ident: Ident {
+ namespace: None,
+ name: "i32_2"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Array {
+ ty: Array {
+ ty: Int64,
+ size: Constant(
+ "4"
+ )
+ },
+ size: Constant(
+ "arrays_size"
+ )
+ },
+ ident: Ident {
+ namespace: None,
+ name: "i64_2"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Array {
+ ty: Array {
+ ty: UInt8,
+ size: Constant(
+ "4"
+ )
+ },
+ size: Constant(
+ "arrays_size"
+ )
+ },
+ ident: Ident {
+ namespace: None,
+ name: "u8_2"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Array {
+ ty: Array {
+ ty: UInt16,
+ size: Constant(
+ "4"
+ )
+ },
+ size: Constant(
+ "arrays_size"
+ )
+ },
+ ident: Ident {
+ namespace: None,
+ name: "u16_2"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Array {
+ ty: Array {
+ ty: UInt32,
+ size: Constant(
+ "4"
+ )
+ },
+ size: Constant(
+ "arrays_size"
+ )
+ },
+ ident: Ident {
+ namespace: None,
+ name: "u32_2"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Array {
+ ty: Array {
+ ty: UInt64,
+ size: Constant(
+ "4"
+ )
+ },
+ size: Constant(
+ "arrays_size"
+ )
+ },
+ ident: Ident {
+ namespace: None,
+ name: "u64_2"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Array {
+ ty: Array {
+ ty: Float32,
+ size: Constant(
+ "4"
+ )
+ },
+ size: Constant(
+ "arrays_size"
+ )
+ },
+ ident: Ident {
+ namespace: None,
+ name: "f32_2"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Array {
+ ty: Array {
+ ty: Float64,
+ size: Constant(
+ "4"
+ )
+ },
+ size: Constant(
+ "arrays_size"
+ )
+ },
+ ident: Ident {
+ namespace: None,
+ name: "f64_2"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Array {
+ ty: Array {
+ ty: Handle {
+ ty: Handle,
+ reference: false
+ },
+ size: Constant(
+ "4"
+ )
+ },
+ size: Constant(
+ "arrays_size"
+ )
+ },
+ ident: Ident {
+ namespace: None,
+ name: "handle_2"
+ },
+ val: None
+ }
+ ]
+ },
+ Constant {
+ attributes: Attrs(
+ []
+ ),
+ name: "vectors_size",
+ ty: UInt32,
+ value: Constant(
+ "32"
+ )
+ },
+ Struct {
+ attributes: Attrs(
+ []
+ ),
+ name: "vectors",
+ fields: [
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Bool,
+ size: None,
+ nullable: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "b_0"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Int8,
+ size: None,
+ nullable: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "i8_0"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Int16,
+ size: None,
+ nullable: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "i16_0"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Int32,
+ size: None,
+ nullable: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "i32_0"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Int64,
+ size: None,
+ nullable: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "i64_0"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: UInt8,
+ size: None,
+ nullable: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "u8_0"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: UInt16,
+ size: None,
+ nullable: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "u16_0"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: UInt32,
+ size: None,
+ nullable: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "u32_0"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: UInt64,
+ size: None,
+ nullable: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "u64_0"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Float32,
+ size: None,
+ nullable: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "f32_0"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Float64,
+ size: None,
+ nullable: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "f64_0"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Handle {
+ ty: Handle,
+ reference: false
+ },
+ size: None,
+ nullable: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "handle_0"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Vector {
+ ty: Bool,
+ size: Some(
+ Constant(
+ "4"
+ )
+ ),
+ nullable: false
+ },
+ size: None,
+ nullable: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "b_1"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Vector {
+ ty: Int8,
+ size: Some(
+ Constant(
+ "4"
+ )
+ ),
+ nullable: false
+ },
+ size: None,
+ nullable: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "i8_1"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Vector {
+ ty: Int16,
+ size: Some(
+ Constant(
+ "4"
+ )
+ ),
+ nullable: false
+ },
+ size: None,
+ nullable: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "i16_1"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Vector {
+ ty: Int32,
+ size: Some(
+ Constant(
+ "4"
+ )
+ ),
+ nullable: false
+ },
+ size: None,
+ nullable: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "i32_1"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Vector {
+ ty: Int64,
+ size: Some(
+ Constant(
+ "4"
+ )
+ ),
+ nullable: false
+ },
+ size: None,
+ nullable: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "i64_1"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Vector {
+ ty: UInt8,
+ size: Some(
+ Constant(
+ "4"
+ )
+ ),
+ nullable: false
+ },
+ size: None,
+ nullable: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "u8_1"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Vector {
+ ty: UInt16,
+ size: Some(
+ Constant(
+ "4"
+ )
+ ),
+ nullable: false
+ },
+ size: None,
+ nullable: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "u16_1"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Vector {
+ ty: UInt32,
+ size: Some(
+ Constant(
+ "4"
+ )
+ ),
+ nullable: false
+ },
+ size: None,
+ nullable: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "u32_1"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Vector {
+ ty: UInt64,
+ size: Some(
+ Constant(
+ "4"
+ )
+ ),
+ nullable: false
+ },
+ size: None,
+ nullable: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "u64_1"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Vector {
+ ty: Float32,
+ size: Some(
+ Constant(
+ "4"
+ )
+ ),
+ nullable: false
+ },
+ size: None,
+ nullable: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "f32_1"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Vector {
+ ty: Float64,
+ size: Some(
+ Constant(
+ "4"
+ )
+ ),
+ nullable: false
+ },
+ size: None,
+ nullable: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "f64_1"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Vector {
+ ty: Handle {
+ ty: Handle,
+ reference: false
+ },
+ size: Some(
+ Constant(
+ "4"
+ )
+ ),
+ nullable: false
+ },
+ size: None,
+ nullable: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "handle_1"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Bool,
+ size: Some(
+ Constant(
+ "1"
+ )
+ ),
+ nullable: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "b_sized_0"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Int8,
+ size: Some(
+ Constant(
+ "1"
+ )
+ ),
+ nullable: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "i8_sized_0"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Int16,
+ size: Some(
+ Constant(
+ "1"
+ )
+ ),
+ nullable: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "i16_sized_0"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Int32,
+ size: Some(
+ Constant(
+ "1"
+ )
+ ),
+ nullable: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "i32_sized_0"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Int64,
+ size: Some(
+ Constant(
+ "1"
+ )
+ ),
+ nullable: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "i64_sized_0"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: UInt8,
+ size: Some(
+ Constant(
+ "1"
+ )
+ ),
+ nullable: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "u8_sized_0"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: UInt16,
+ size: Some(
+ Constant(
+ "1"
+ )
+ ),
+ nullable: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "u16_sized_0"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: UInt32,
+ size: Some(
+ Constant(
+ "1"
+ )
+ ),
+ nullable: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "u32_sized_0"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: UInt64,
+ size: Some(
+ Constant(
+ "1"
+ )
+ ),
+ nullable: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "u64_sized_0"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Float32,
+ size: Some(
+ Constant(
+ "1"
+ )
+ ),
+ nullable: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "f32_sized_0"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Float64,
+ size: Some(
+ Constant(
+ "1"
+ )
+ ),
+ nullable: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "f64_sized_0"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Handle {
+ ty: Handle,
+ reference: false
+ },
+ size: Some(
+ Constant(
+ "1"
+ )
+ ),
+ nullable: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "handle_sized_0"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Bool,
+ size: Some(
+ Constant(
+ "vectors_size"
+ )
+ ),
+ nullable: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "b_sized_1"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Int8,
+ size: Some(
+ Constant(
+ "vectors_size"
+ )
+ ),
+ nullable: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "i8_sized_1"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Int16,
+ size: Some(
+ Constant(
+ "vectors_size"
+ )
+ ),
+ nullable: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "i16_sized_1"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Int32,
+ size: Some(
+ Constant(
+ "vectors_size"
+ )
+ ),
+ nullable: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "i32_sized_1"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Int64,
+ size: Some(
+ Constant(
+ "vectors_size"
+ )
+ ),
+ nullable: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "i64_sized_1"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: UInt8,
+ size: Some(
+ Constant(
+ "vectors_size"
+ )
+ ),
+ nullable: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "u8_sized_1"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: UInt16,
+ size: Some(
+ Constant(
+ "vectors_size"
+ )
+ ),
+ nullable: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "u16_sized_1"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: UInt32,
+ size: Some(
+ Constant(
+ "vectors_size"
+ )
+ ),
+ nullable: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "u32_sized_1"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: UInt64,
+ size: Some(
+ Constant(
+ "vectors_size"
+ )
+ ),
+ nullable: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "u64_sized_1"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Float32,
+ size: Some(
+ Constant(
+ "vectors_size"
+ )
+ ),
+ nullable: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "f32_sized_1"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Float64,
+ size: Some(
+ Constant(
+ "vectors_size"
+ )
+ ),
+ nullable: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "f64_sized_1"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Handle {
+ ty: Handle,
+ reference: false
+ },
+ size: Some(
+ Constant(
+ "vectors_size"
+ )
+ ),
+ nullable: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "handle_sized_1"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Vector {
+ ty: Bool,
+ size: Some(
+ Constant(
+ "4"
+ )
+ ),
+ nullable: false
+ },
+ size: Some(
+ Constant(
+ "vectors_size"
+ )
+ ),
+ nullable: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "b_sized_2"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Vector {
+ ty: Int8,
+ size: Some(
+ Constant(
+ "4"
+ )
+ ),
+ nullable: false
+ },
+ size: Some(
+ Constant(
+ "vectors_size"
+ )
+ ),
+ nullable: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "i8_sized_2"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Vector {
+ ty: Int16,
+ size: Some(
+ Constant(
+ "4"
+ )
+ ),
+ nullable: false
+ },
+ size: Some(
+ Constant(
+ "vectors_size"
+ )
+ ),
+ nullable: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "i16_sized_2"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Vector {
+ ty: Int32,
+ size: Some(
+ Constant(
+ "4"
+ )
+ ),
+ nullable: false
+ },
+ size: Some(
+ Constant(
+ "vectors_size"
+ )
+ ),
+ nullable: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "i32_sized_2"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Vector {
+ ty: Int64,
+ size: Some(
+ Constant(
+ "4"
+ )
+ ),
+ nullable: false
+ },
+ size: Some(
+ Constant(
+ "vectors_size"
+ )
+ ),
+ nullable: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "i64_sized_2"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Vector {
+ ty: UInt8,
+ size: Some(
+ Constant(
+ "4"
+ )
+ ),
+ nullable: false
+ },
+ size: Some(
+ Constant(
+ "vectors_size"
+ )
+ ),
+ nullable: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "u8_sized_2"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Vector {
+ ty: UInt16,
+ size: Some(
+ Constant(
+ "4"
+ )
+ ),
+ nullable: false
+ },
+ size: Some(
+ Constant(
+ "vectors_size"
+ )
+ ),
+ nullable: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "u16_sized_2"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Vector {
+ ty: UInt32,
+ size: Some(
+ Constant(
+ "4"
+ )
+ ),
+ nullable: false
+ },
+ size: Some(
+ Constant(
+ "vectors_size"
+ )
+ ),
+ nullable: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "u32_sized_2"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Vector {
+ ty: UInt64,
+ size: Some(
+ Constant(
+ "4"
+ )
+ ),
+ nullable: false
+ },
+ size: Some(
+ Constant(
+ "vectors_size"
+ )
+ ),
+ nullable: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "u64_sized_2"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Vector {
+ ty: Float32,
+ size: Some(
+ Constant(
+ "4"
+ )
+ ),
+ nullable: false
+ },
+ size: Some(
+ Constant(
+ "vectors_size"
+ )
+ ),
+ nullable: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "f32_sized_2"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Vector {
+ ty: Float64,
+ size: Some(
+ Constant(
+ "4"
+ )
+ ),
+ nullable: false
+ },
+ size: Some(
+ Constant(
+ "vectors_size"
+ )
+ ),
+ nullable: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "f64_sized_2"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Vector {
+ ty: Handle {
+ ty: Handle,
+ reference: false
+ },
+ size: Some(
+ Constant(
+ "4"
+ )
+ ),
+ nullable: false
+ },
+ size: Some(
+ Constant(
+ "vectors_size"
+ )
+ ),
+ nullable: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "handle_sized_2"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Bool,
+ size: Some(
+ Constant(
+ "1"
+ )
+ ),
+ nullable: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "b_nullable_0"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Int8,
+ size: Some(
+ Constant(
+ "1"
+ )
+ ),
+ nullable: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "i8_nullable_0"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Int16,
+ size: Some(
+ Constant(
+ "1"
+ )
+ ),
+ nullable: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "i16_nullable_0"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Int32,
+ size: Some(
+ Constant(
+ "1"
+ )
+ ),
+ nullable: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "i32_nullable_0"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Int64,
+ size: Some(
+ Constant(
+ "1"
+ )
+ ),
+ nullable: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "i64_nullable_0"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: UInt8,
+ size: Some(
+ Constant(
+ "1"
+ )
+ ),
+ nullable: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "u8_nullable_0"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: UInt16,
+ size: Some(
+ Constant(
+ "1"
+ )
+ ),
+ nullable: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "u16_nullable_0"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: UInt32,
+ size: Some(
+ Constant(
+ "1"
+ )
+ ),
+ nullable: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "u32_nullable_0"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: UInt64,
+ size: Some(
+ Constant(
+ "1"
+ )
+ ),
+ nullable: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "u64_nullable_0"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Float32,
+ size: Some(
+ Constant(
+ "1"
+ )
+ ),
+ nullable: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "f32_nullable_0"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Float64,
+ size: Some(
+ Constant(
+ "1"
+ )
+ ),
+ nullable: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "f64_nullable_0"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Handle {
+ ty: Handle,
+ reference: false
+ },
+ size: Some(
+ Constant(
+ "1"
+ )
+ ),
+ nullable: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "handle_nullable_0"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Vector {
+ ty: Bool,
+ size: Some(
+ Constant(
+ "4"
+ )
+ ),
+ nullable: false
+ },
+ size: None,
+ nullable: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "b_nullable_1"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Vector {
+ ty: Int8,
+ size: Some(
+ Constant(
+ "4"
+ )
+ ),
+ nullable: false
+ },
+ size: None,
+ nullable: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "i8_nullable_1"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Vector {
+ ty: Int16,
+ size: Some(
+ Constant(
+ "4"
+ )
+ ),
+ nullable: false
+ },
+ size: None,
+ nullable: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "i16_nullable_1"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Vector {
+ ty: Int32,
+ size: Some(
+ Constant(
+ "4"
+ )
+ ),
+ nullable: false
+ },
+ size: None,
+ nullable: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "i32_nullable_1"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Vector {
+ ty: Int64,
+ size: Some(
+ Constant(
+ "4"
+ )
+ ),
+ nullable: false
+ },
+ size: None,
+ nullable: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "i64_nullable_1"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Vector {
+ ty: UInt8,
+ size: Some(
+ Constant(
+ "4"
+ )
+ ),
+ nullable: false
+ },
+ size: None,
+ nullable: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "u8_nullable_1"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Vector {
+ ty: UInt16,
+ size: Some(
+ Constant(
+ "4"
+ )
+ ),
+ nullable: false
+ },
+ size: None,
+ nullable: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "u16_nullable_1"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Vector {
+ ty: UInt32,
+ size: Some(
+ Constant(
+ "4"
+ )
+ ),
+ nullable: false
+ },
+ size: None,
+ nullable: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "u32_nullable_1"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Vector {
+ ty: UInt64,
+ size: Some(
+ Constant(
+ "4"
+ )
+ ),
+ nullable: false
+ },
+ size: None,
+ nullable: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "u64_nullable_1"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Vector {
+ ty: Float32,
+ size: Some(
+ Constant(
+ "4"
+ )
+ ),
+ nullable: false
+ },
+ size: None,
+ nullable: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "f32_nullable_1"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Vector {
+ ty: Float64,
+ size: Some(
+ Constant(
+ "4"
+ )
+ ),
+ nullable: false
+ },
+ size: None,
+ nullable: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "f64_nullable_1"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Vector {
+ ty: Handle {
+ ty: Handle,
+ reference: false
+ },
+ size: Some(
+ Constant(
+ "4"
+ )
+ ),
+ nullable: false
+ },
+ size: None,
+ nullable: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "handle_nullable_1"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Bool,
+ size: Some(
+ Constant(
+ "1"
+ )
+ ),
+ nullable: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "b_nullable_sized_0"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Int8,
+ size: Some(
+ Constant(
+ "1"
+ )
+ ),
+ nullable: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "i8_nullable_sized_0"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Int16,
+ size: Some(
+ Constant(
+ "1"
+ )
+ ),
+ nullable: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "i16_nullable_sized_0"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Int32,
+ size: Some(
+ Constant(
+ "1"
+ )
+ ),
+ nullable: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "i32_nullable_sized_0"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Int64,
+ size: Some(
+ Constant(
+ "1"
+ )
+ ),
+ nullable: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "i64_nullable_sized_0"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: UInt8,
+ size: Some(
+ Constant(
+ "1"
+ )
+ ),
+ nullable: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "u8_nullable_sized_0"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: UInt16,
+ size: Some(
+ Constant(
+ "1"
+ )
+ ),
+ nullable: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "u16_nullable_sized_0"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: UInt32,
+ size: Some(
+ Constant(
+ "1"
+ )
+ ),
+ nullable: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "u32_nullable_sized_0"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: UInt64,
+ size: Some(
+ Constant(
+ "1"
+ )
+ ),
+ nullable: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "u64_nullable_sized_0"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Float32,
+ size: Some(
+ Constant(
+ "1"
+ )
+ ),
+ nullable: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "f32_nullable_sized_0"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Float64,
+ size: Some(
+ Constant(
+ "1"
+ )
+ ),
+ nullable: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "f64_nullable_sized_0"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Handle {
+ ty: Handle,
+ reference: false
+ },
+ size: Some(
+ Constant(
+ "1"
+ )
+ ),
+ nullable: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "handle_nullable_sized_0"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Bool,
+ size: Some(
+ Constant(
+ "vectors_size"
+ )
+ ),
+ nullable: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "b_nullable_sized_1"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Int8,
+ size: Some(
+ Constant(
+ "vectors_size"
+ )
+ ),
+ nullable: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "i8_nullable_sized_1"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Int16,
+ size: Some(
+ Constant(
+ "vectors_size"
+ )
+ ),
+ nullable: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "i16_nullable_sized_1"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Int32,
+ size: Some(
+ Constant(
+ "vectors_size"
+ )
+ ),
+ nullable: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "i32_nullable_sized_1"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Int64,
+ size: Some(
+ Constant(
+ "vectors_size"
+ )
+ ),
+ nullable: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "i64_nullable_sized_1"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: UInt8,
+ size: Some(
+ Constant(
+ "vectors_size"
+ )
+ ),
+ nullable: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "u8_nullable_sized_1"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: UInt16,
+ size: Some(
+ Constant(
+ "vectors_size"
+ )
+ ),
+ nullable: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "u16_nullable_sized_1"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: UInt32,
+ size: Some(
+ Constant(
+ "vectors_size"
+ )
+ ),
+ nullable: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "u32_nullable_sized_1"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: UInt64,
+ size: Some(
+ Constant(
+ "vectors_size"
+ )
+ ),
+ nullable: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "u64_nullable_sized_1"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Float32,
+ size: Some(
+ Constant(
+ "vectors_size"
+ )
+ ),
+ nullable: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "f32_nullable_sized_1"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Float64,
+ size: Some(
+ Constant(
+ "vectors_size"
+ )
+ ),
+ nullable: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "f64_nullable_sized_1"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Handle {
+ ty: Handle,
+ reference: false
+ },
+ size: Some(
+ Constant(
+ "vectors_size"
+ )
+ ),
+ nullable: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "handle_nullable_sized_1"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Vector {
+ ty: Bool,
+ size: Some(
+ Constant(
+ "4"
+ )
+ ),
+ nullable: false
+ },
+ size: Some(
+ Constant(
+ "vectors_size"
+ )
+ ),
+ nullable: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "b_nullable_sized_2"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Vector {
+ ty: Int8,
+ size: Some(
+ Constant(
+ "4"
+ )
+ ),
+ nullable: false
+ },
+ size: Some(
+ Constant(
+ "vectors_size"
+ )
+ ),
+ nullable: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "i8_nullable_sized_2"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Vector {
+ ty: Int16,
+ size: Some(
+ Constant(
+ "4"
+ )
+ ),
+ nullable: false
+ },
+ size: Some(
+ Constant(
+ "vectors_size"
+ )
+ ),
+ nullable: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "i16_nullable_sized_2"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Vector {
+ ty: Int32,
+ size: Some(
+ Constant(
+ "4"
+ )
+ ),
+ nullable: false
+ },
+ size: Some(
+ Constant(
+ "vectors_size"
+ )
+ ),
+ nullable: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "i32_nullable_sized_2"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Vector {
+ ty: Int64,
+ size: Some(
+ Constant(
+ "4"
+ )
+ ),
+ nullable: false
+ },
+ size: Some(
+ Constant(
+ "vectors_size"
+ )
+ ),
+ nullable: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "i64_nullable_sized_2"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Vector {
+ ty: UInt8,
+ size: Some(
+ Constant(
+ "4"
+ )
+ ),
+ nullable: false
+ },
+ size: Some(
+ Constant(
+ "vectors_size"
+ )
+ ),
+ nullable: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "u8_nullable_sized_2"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Vector {
+ ty: UInt16,
+ size: Some(
+ Constant(
+ "4"
+ )
+ ),
+ nullable: false
+ },
+ size: Some(
+ Constant(
+ "vectors_size"
+ )
+ ),
+ nullable: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "u16_nullable_sized_2"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Vector {
+ ty: UInt32,
+ size: Some(
+ Constant(
+ "4"
+ )
+ ),
+ nullable: false
+ },
+ size: Some(
+ Constant(
+ "vectors_size"
+ )
+ ),
+ nullable: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "u32_nullable_sized_2"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Vector {
+ ty: UInt64,
+ size: Some(
+ Constant(
+ "4"
+ )
+ ),
+ nullable: false
+ },
+ size: Some(
+ Constant(
+ "vectors_size"
+ )
+ ),
+ nullable: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "u64_nullable_sized_2"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Vector {
+ ty: Float32,
+ size: Some(
+ Constant(
+ "4"
+ )
+ ),
+ nullable: false
+ },
+ size: Some(
+ Constant(
+ "vectors_size"
+ )
+ ),
+ nullable: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "f32_nullable_sized_2"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Vector {
+ ty: Float64,
+ size: Some(
+ Constant(
+ "4"
+ )
+ ),
+ nullable: false
+ },
+ size: Some(
+ Constant(
+ "vectors_size"
+ )
+ ),
+ nullable: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "f64_nullable_sized_2"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Vector {
+ ty: Vector {
+ ty: Handle {
+ ty: Handle,
+ reference: false
+ },
+ size: Some(
+ Constant(
+ "4"
+ )
+ ),
+ nullable: false
+ },
+ size: Some(
+ Constant(
+ "vectors_size"
+ )
+ ),
+ nullable: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "handle_nullable_sized_2"
+ },
+ val: None
+ }
+ ]
+ },
+ Struct {
+ attributes: Attrs(
+ [
+ Attr {
+ key: "Awesome",
+ val: None
+ }
+ ]
+ ),
+ name: "handles",
+ fields: [
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Handle {
+ ty: Handle,
+ reference: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "handle_handle"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Handle {
+ ty: Process,
+ reference: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "process_handle"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Handle {
+ ty: Thread,
+ reference: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "thread_handle"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Handle {
+ ty: Vmo,
+ reference: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "vmo_handle"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Handle {
+ ty: Channel,
+ reference: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "channel_handle"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Handle {
+ ty: Event,
+ reference: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "event_handle"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Handle {
+ ty: Port,
+ reference: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "port_handle"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Handle {
+ ty: Interrupt,
+ reference: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "interrupt_handle"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Handle {
+ ty: DebugLog,
+ reference: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "debuglog_handle"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Handle {
+ ty: Socket,
+ reference: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "socket_handle"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Handle {
+ ty: Resource,
+ reference: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "resource_handle"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Handle {
+ ty: EventPair,
+ reference: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "eventpair_handle"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Handle {
+ ty: Job,
+ reference: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "job_handle"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Handle {
+ ty: Vmar,
+ reference: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "vmar_handle"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Handle {
+ ty: Fifo,
+ reference: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "fifo_handle"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Handle {
+ ty: Guest,
+ reference: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "guest_handle"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Handle {
+ ty: Timer,
+ reference: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "timer_handle"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Handle {
+ ty: Profile,
+ reference: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "profile_handle"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Handle {
+ ty: Handle,
+ reference: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "nullable_handle_handle"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Handle {
+ ty: Process,
+ reference: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "nullable_process_handle"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Handle {
+ ty: Thread,
+ reference: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "nullable_thread_handle"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Handle {
+ ty: Vmo,
+ reference: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "nullable_vmo_handle"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Handle {
+ ty: Channel,
+ reference: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "nullable_channel_handle"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Handle {
+ ty: Event,
+ reference: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "nullable_event_handle"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Handle {
+ ty: Port,
+ reference: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "nullable_port_handle"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Handle {
+ ty: Interrupt,
+ reference: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "nullable_interrupt_handle"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Handle {
+ ty: DebugLog,
+ reference: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "nullable_debuglog_handle"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Handle {
+ ty: Socket,
+ reference: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "nullable_socket_handle"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Handle {
+ ty: Resource,
+ reference: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "nullable_resource_handle"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Handle {
+ ty: EventPair,
+ reference: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "nullable_eventpair_handle"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Handle {
+ ty: Job,
+ reference: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "nullable_job_handle"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Handle {
+ ty: Vmar,
+ reference: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "nullable_vmar_handle"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Handle {
+ ty: Fifo,
+ reference: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "nullable_fifo_handle"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Handle {
+ ty: Guest,
+ reference: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "nullable_guest_handle"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Handle {
+ ty: Timer,
+ reference: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "nullable_timer_handle"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Handle {
+ ty: Profile,
+ reference: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "nullable_profile_handle"
+ },
+ val: None
+ }
+ ]
+ },
+ Constant {
+ attributes: Attrs(
+ []
+ ),
+ name: "strings_size",
+ ty: UInt32,
+ value: Constant(
+ "32"
+ )
+ },
+ Struct {
+ attributes: Attrs(
+ []
+ ),
+ name: "strings",
+ fields: [
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Str {
+ size: None,
+ nullable: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "s"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Str {
+ size: None,
+ nullable: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "nullable_s"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Str {
+ size: Some(
+ Constant(
+ "4"
+ )
+ ),
+ nullable: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "size_0_s"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Str {
+ size: Some(
+ Constant(
+ "strings_size"
+ )
+ ),
+ nullable: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "size_1_s"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Str {
+ size: Some(
+ Constant(
+ "4"
+ )
+ ),
+ nullable: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "nullable_size_0_s"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Str {
+ size: Some(
+ Constant(
+ "strings_size"
+ )
+ ),
+ nullable: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "nullable_size_1_s"
+ },
+ val: None
+ }
+ ]
+ },
+ Enum {
+ attributes: Attrs(
+ []
+ ),
+ name: "default_enum",
+ ty: UInt32,
+ variants: [
+ EnumVariant {
+ attributes: Attrs(
+ []
+ ),
+ name: "x ",
+ size: Constant(
+ "23"
+ )
+ }
+ ]
+ },
+ Enum {
+ attributes: Attrs(
+ []
+ ),
+ name: "i8_enum",
+ ty: Int8,
+ variants: [
+ EnumVariant {
+ attributes: Attrs(
+ []
+ ),
+ name: "x ",
+ size: Constant(
+ "23"
+ )
+ }
+ ]
+ },
+ Enum {
+ attributes: Attrs(
+ []
+ ),
+ name: "i16_enum",
+ ty: Int16,
+ variants: [
+ EnumVariant {
+ attributes: Attrs(
+ []
+ ),
+ name: "x ",
+ size: Constant(
+ "23"
+ )
+ }
+ ]
+ },
+ Enum {
+ attributes: Attrs(
+ []
+ ),
+ name: "i32_enum",
+ ty: Int32,
+ variants: [
+ EnumVariant {
+ attributes: Attrs(
+ []
+ ),
+ name: "x ",
+ size: Constant(
+ "23"
+ )
+ }
+ ]
+ },
+ Enum {
+ attributes: Attrs(
+ []
+ ),
+ name: "i64_enum",
+ ty: Int64,
+ variants: [
+ EnumVariant {
+ attributes: Attrs(
+ []
+ ),
+ name: "x ",
+ size: Constant(
+ "23"
+ )
+ }
+ ]
+ },
+ Enum {
+ attributes: Attrs(
+ []
+ ),
+ name: "u8_enum",
+ ty: UInt8,
+ variants: [
+ EnumVariant {
+ attributes: Attrs(
+ []
+ ),
+ name: "x ",
+ size: Constant(
+ "23"
+ )
+ }
+ ]
+ },
+ Enum {
+ attributes: Attrs(
+ []
+ ),
+ name: "u16_enum",
+ ty: UInt16,
+ variants: [
+ EnumVariant {
+ attributes: Attrs(
+ []
+ ),
+ name: "x ",
+ size: Constant(
+ "23"
+ )
+ }
+ ]
+ },
+ Enum {
+ attributes: Attrs(
+ []
+ ),
+ name: "u32_enum",
+ ty: UInt32,
+ variants: [
+ EnumVariant {
+ attributes: Attrs(
+ []
+ ),
+ name: "x ",
+ size: Constant(
+ "23"
+ )
+ }
+ ]
+ },
+ Enum {
+ attributes: Attrs(
+ []
+ ),
+ name: "u64_enum",
+ ty: UInt64,
+ variants: [
+ EnumVariant {
+ attributes: Attrs(
+ []
+ ),
+ name: "x ",
+ size: Constant(
+ "23"
+ )
+ }
+ ]
+ },
+ Struct {
+ attributes: Attrs(
+ []
+ ),
+ name: "structs",
+ fields: [
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Identifier {
+ id: Ident {
+ namespace: None,
+ name: "this_is_a_struct"
+ },
+ reference: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "s"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Identifier {
+ id: Ident {
+ namespace: None,
+ name: "this_is_a_struct"
+ },
+ reference: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "nullable_s"
+ },
+ val: None
+ }
+ ]
+ },
+ Struct {
+ attributes: Attrs(
+ []
+ ),
+ name: "unions",
+ fields: [
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Identifier {
+ id: Ident {
+ namespace: None,
+ name: "this_is_a_union"
+ },
+ reference: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "s"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Identifier {
+ id: Ident {
+ namespace: None,
+ name: "this_is_a_union"
+ },
+ reference: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "nullable_u"
+ },
+ val: None
+ }
+ ]
+ },
+ Struct {
+ attributes: Attrs(
+ []
+ ),
+ name: "interfaces",
+ fields: [
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Identifier {
+ id: Ident {
+ namespace: None,
+ name: "this_is_an_interface"
+ },
+ reference: false
+ },
+ ident: Ident {
+ namespace: None,
+ name: "i"
+ },
+ val: None
+ },
+ StructField {
+ attributes: Attrs(
+ []
+ ),
+ ty: Identifier {
+ id: Ident {
+ namespace: None,
+ name: "this_is_an_interface"
+ },
+ reference: true
+ },
+ ident: Ident {
+ namespace: None,
+ name: "nullable_i"
+ },
+ val: None
+ }
+ ]
+ }
+ ]
+ }
+}
diff --git a/garnet/bin/banjo/test/ast/view.test.ast b/garnet/bin/banjo/test/ast/view.test.ast
index 3b9148b..f50ab4b 100644
--- a/garnet/bin/banjo/test/ast/view.test.ast
+++ b/garnet/bin/banjo/test/ast/view.test.ast
@@ -16,7 +16,8 @@
ident: Ident {
namespace: None,
name: "x"
- }
+ },
+ val: None
},
StructField {
attributes: Attrs(
@@ -26,7 +27,8 @@
ident: Ident {
namespace: None,
name: "y"
- }
+ },
+ val: None
}
]
}
diff --git a/garnet/bin/banjo/test/ast_tests.rs b/garnet/bin/banjo/test/ast_tests.rs
index acab7cb..8a5ad26 100644
--- a/garnet/bin/banjo/test/ast_tests.rs
+++ b/garnet/bin/banjo/test/ast_tests.rs
@@ -18,6 +18,7 @@
codegen_test!(example_7, AstBackend, ["banjo/example-7.test.banjo"], "ast/example-7.test.ast");
codegen_test!(example_8, AstBackend, ["banjo/example-8.test.banjo"], "ast/example-8.test.ast");
codegen_test!(example_9, AstBackend, ["banjo/example-9.test.banjo"], "ast/example-9.test.ast");
+codegen_test!(types, AstBackend, ["banjo/types.test.banjo"], "ast/types.test.ast");
codegen_test!(point, AstBackend, ["banjo/point.test.banjo"], "ast/point.test.ast");
codegen_test!(tables, AstBackend, ["banjo/tables.test.banjo"], "ast/tables.test.ast");
codegen_test!(
diff --git a/garnet/bin/banjo/test/banjo/types.test.banjo b/garnet/bin/banjo/test/banjo/types.test.banjo
index 3bbeb8c..8b5598b 100644
--- a/garnet/bin/banjo/test/banjo/types.test.banjo
+++ b/garnet/bin/banjo/test/banjo/types.test.banjo
@@ -46,8 +46,6 @@
uint16 u16 = 348;
uint32 u32 = 9038;
uint64 u64 = 19835;
- float32 f32 = 1.30;
- float64 f64 = 0.0000054;
string s = "hello";
};