diff --git a/macros/src/codegen.rs b/macros/src/codegen.rs index 158c74f..e109739 100644 --- a/macros/src/codegen.rs +++ b/macros/src/codegen.rs @@ -494,6 +494,9 @@ pub fn generate_code(sm: &ParsedStateMachine) -> proc_macro2::TokenStream { #guard_list #action_list #entry_list + + #[allow(missing_docs)] + fn transition_callback(&self, new_state: &Option<#states_type_name>) {} } /// List of auto-generated states. @@ -588,6 +591,7 @@ pub fn generate_code(sm: &ParsedStateMachine) -> proc_macro2::TokenStream { #(#events_type_name::#events => { #code_blocks + self.context().transition_callback(&self.state); self.state() }),* _ => {