StopSequenceFilter constructor
Creates a filter for stopSequences.
onStop is invoked once when a stop sequence match terminates the
stream, letting the caller distinguish a stop-terminated run from one
that ended naturally (e.g. to abort the underlying generation).
Implementation
const StopSequenceFilter(this.stopSequences, {this.onStop});