streamFromInputStream method

  1. @override
Stream<String> streamFromInputStream(
  1. Stream<ParserInput> inputStream, {
  2. OutputParserOptions? options,
})
override

Streams the output of invoking the Runnable on the given inputStream.

  • inputStream - the input stream to invoke the Runnable on.
  • options - the options to use when invoking the Runnable.

Implementation

@override
Stream<String> streamFromInputStream(
  final Stream<ParserInput> inputStream, {
  final OutputParserOptions? options,
}) async* {
  if (reduceOutputStream) {
    yield await inputStream.map(_parse).reduce((final a, final b) => '$a$b');
  } else {
    yield* inputStream.map(_parse);
  }
}