public int ReadEvalPrintLoop() { if (startup_files != null && startup_files.Length == 0) { InitTerminal(startup_files.Length == 0); } InitializeUsing(); LoadStartupFiles(); if (startup_files != null && startup_files.Length != 0) { ExecuteSources(startup_files, false); } else { ReadEvalPrintLoopWith(GetLine); editor.SaveHistory(); } Console.CancelKeyPress -= ConsoleInterrupt; return(0); }
public int ReadEvalPrintLoop() { if (startup_files != null && startup_files.Length == 0) { InitTerminal(startup_files.Length == 0 && Driver.StartupEvalExpression == null); } InitializeUsing(); LoadStartupFiles(); if (startup_files != null && startup_files.Length != 0) { ExecuteSources(startup_files, false); } else { if (Driver.StartupEvalExpression != null) { ReadEvalPrintLoopWith(p => { var ret = Driver.StartupEvalExpression; Driver.StartupEvalExpression = null; return(ret); }); } else { ReadEvalPrintLoopWith(GetLine); } editor.SaveHistory(); } Console.CancelKeyPress -= ConsoleInterrupt; return(0); }