Interpreter constructor

Interpreter({
  1. String? source,
  2. TextOutputMethod? standardOutput,
  3. TextOutputMethod? errorOutput,
})

Constructor taking some MiniScript source code, and the output delegates.

Implementation

Interpreter({
  this.source,
  TextOutputMethod? standardOutput,
  TextOutputMethod? errorOutput,
}) {
  _standardOutput = standardOutput ?? ((s, eol) => print(s));
  this.errorOutput = errorOutput ?? ((s, eol) => print(s));
}