public InOutConsole(VirtualTerminal terminal) { this.terminal = terminal; }
private static void RunRepl(TextReader input, TextWriter output) { var vt = new VirtualTerminal(input, output); var console = new InOutConsole(vt); var scriptServices = BuildScriptServices(console); while (true) { string line = vt.ReadLine(">"); if (line == "q") { scriptServices.Repl.Terminate(); break; } if (!string.IsNullOrWhiteSpace(line)) { vt.RecordHistoryLine(line); } scriptServices.Repl.Execute(line); } }