From ddada4509729b0b8dcc394737d7eec588df51040 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Sun, 20 Nov 2022 23:32:30 +0100 Subject: Tracepoints for show rules --- macros/src/lib.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'macros') 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::() } + fn name(&self) -> &'static str { + #name + } + #vtable } -- cgit v1.2.3