pub fn interpreter(
st: &mut State,
start: Utf8Iter<'_>,
io: Arc<Mutex<IOStreams>>,
ll: LogLevel,
kill: Option<&Receiver<()>>,
restrict: bool,
) -> Result<ExecResult>Expand description
Interpreter entry point, executes ADC commands to modify state
§Arguments
st: State struct to work on, modified in-placestart: Initial commands to runio: Bundle of IO stream handlesio.0: Input, read by ? one line at a timeio.1: Output, written to by printing commandsio.2: Error messages, one per line
ll: Level of verbosity forio.2kill: Receiver for a kill signal from a parent thread, checked withtry_recvin the command parsing looprestrict: Restricted mode switch, prevents OS access (for untrusted input). Iffalse, the interpreter may read/write files and execute OS commands, subject to any OS-level permissions.
§Errors
Any IO errors that arise when accessing the IO streams are returned early, aborting the interpreter. Keep that possibility to a minimum when preparing custom IO streams.
§Panics
Shouldn’t™