diff options
Diffstat (limited to 'macros')
| -rw-r--r-- | macros/src/lib.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/macros/src/lib.rs b/macros/src/lib.rs index eaa929dc..7e2caae5 100644 --- a/macros/src/lib.rs +++ b/macros/src/lib.rs @@ -109,6 +109,8 @@ fn expand_node( } }; + let name = self_name.trim_end_matches("Node").to_lowercase(); + // Put everything into a module with a hopefully unique type to isolate // it from the outside. Ok(quote! { @@ -131,6 +133,10 @@ fn expand_node( model::NodeId::of::<Self>() } + fn name(&self) -> &'static str { + #name + } + #vtable } |
