aboutsummaryrefslogtreecommitdiffstats
path: root/src/backend/targets/C
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/targets/C')
-rw-r--r--src/backend/targets/C/ast_to_c.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/backend/targets/C/ast_to_c.c b/src/backend/targets/C/ast_to_c.c
index 9b8f95c..cd01e67 100644
--- a/src/backend/targets/C/ast_to_c.c
+++ b/src/backend/targets/C/ast_to_c.c
@@ -209,7 +209,9 @@ void ast_transitions_of_state_to_c(FILE *out,struct AST_Machine *machine,struct
if(vector->number_of_transitions>0)
{
- fprintf(out,"\n\t%smachine_states_lock=1;\n",context_arrow);
+ fprintf(out,"\n\t%smachine_states_lock=1;\n\n",context_arrow);
+ ast_statement_to_c(out,1,vector->state->on_exit_statement,options);
+ fprintf(out,"\n");
fprintf(out,"\tswitch(event)\n\t{\n");
for(i=0;i<vector->number_of_transitions;++i)
{
@@ -227,6 +229,7 @@ void ast_transitions_of_state_to_c(FILE *out,struct AST_Machine *machine,struct
//ast_pipeline_to_c(out,3,vector->transitions[i]->pipeline);
ast_statement_to_c(out,indentation,vector->transitions[i]->statement,options);
+ ast_statement_to_c(out,indentation,vector->transitions[i]->to->on_entry_statement,options);
ast_to_c_print_tabs(out,indentation);
fprintf(out,"%smachine_states[",context_arrow);
ast_token_to_c(out,machine->id);