Example #1
0
        private void CompileTransition(Subtransition st, State state)
        {
            var transition = new SemanticTransition();

            transition.Actions.AddRange(st.Actions);

            transition.Event     = st.Event;
            transition.NextState = st.NextState == null ? state : ast.States[st.NextState];

            state.Transitions.Add(transition);
        }
Example #2
0
        public void Visit(SemanticTransition transition)
        {
            var actions = string.Join(" ", transition.Actions);

            stringBuilder.AppendLine($"\t\t{transition.Event ?? "null"} {transition.NextState.Name} {{{actions}}}");
        }