add support for custom debug/display formatting of #[hdl] structs/enums
also cleans up default debug formatting to use the struct/enum name (or MaskType<StructName>) instead of the implementation detail type name.
This commit is contained in:
parent
402f457c68
commit
8e4eeef723
18 changed files with 773 additions and 63 deletions
|
|
@ -42,6 +42,7 @@ pub(crate) trait CustomToken:
|
|||
|
||||
mod kw {
|
||||
pub(crate) use syn::token::Extern as extern_;
|
||||
pub(crate) use syn::token::Type as type_;
|
||||
|
||||
macro_rules! custom_keyword {
|
||||
($kw:ident) => {
|
||||
|
|
@ -75,6 +76,8 @@ mod kw {
|
|||
custom_keyword!(cmp_eq);
|
||||
custom_keyword!(connect_inexact);
|
||||
custom_keyword!(custom_bounds);
|
||||
custom_keyword!(custom_debug);
|
||||
custom_keyword!(custom_sim_display);
|
||||
custom_keyword!(flip);
|
||||
custom_keyword!(get);
|
||||
custom_keyword!(hdl);
|
||||
|
|
@ -83,6 +86,8 @@ mod kw {
|
|||
custom_keyword!(input);
|
||||
custom_keyword!(instance);
|
||||
custom_keyword!(m);
|
||||
custom_keyword!(mask_sim);
|
||||
custom_keyword!(mask_type);
|
||||
custom_keyword!(memory);
|
||||
custom_keyword!(memory_array);
|
||||
custom_keyword!(memory_with_init);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue