Draft out IntDatatype in wiggle-generate (#15)
* Draft out IntDatatype in wiggle-generate This commit drafts out basic layout for `IntDatatype` structure in `wiggle`. As it currently stands, an `Int` type is represented as a one-element tuple struct much like `FlagDatatype`, however, with this difference that we do not perform any checks on the input underlying representation since any value for the prescribed type is legal. * Finish drafting IntDatatype support in wiggle This commit adds necessary marshal stubs to properly pass `IntDatatype` in and out of interface functions. It also adds a basic proptest.
This commit is contained in:
@@ -86,6 +86,10 @@ impl Names {
|
||||
format_ident!("{}", id.as_str().to_shouty_snake_case())
|
||||
}
|
||||
|
||||
pub fn int_member(&self, id: &Id) -> Ident {
|
||||
format_ident!("{}", id.as_str().to_shouty_snake_case())
|
||||
}
|
||||
|
||||
pub fn struct_member(&self, id: &Id) -> Ident {
|
||||
format_ident!("{}", id.as_str().to_snake_case())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user