collect method

List<OperationState> collect(
  1. State state
)

Collects (finds) the final (last) states of the state and returns them as a list.

Implementation

List<OperationState> collect(State state) {
  final states = state.accept(this);
  return states;
}