(state name ..clauses) name: a sym clauses: zero or more forms
C
Defines a class state.
A state is part of an object which can be dynamically enabled and disabled. It may contain most of the same class clauses which might appear at the toplevel of a class, but when the state is inactive, the object behaves as though those clauses are absent.
state
, state*
and fsm
clauses may be nested within
another state. We emit automatic state changes to ensure that, when the child state is
active, the parent state must also be active:
- When a child state would be enabled, and its parent is inactive, the parent is automatically enabled first.
- When a parent state would be disabled, any active child states are automatically disabled first.
- After a parent state is enabled, any child
state*
forms are automatically enabled.