Function eval

Source
pub fn eval<W: ?Sized + Write>(script: &str, handle: &mut W) -> Result<()>
Expand description

Evaluate a script.

A string slice and a handle is passed. Handle must implement std::io::Write trait. It can be a [Stdout].

ยงErrors

Fails if there is a error while evaluating a single char.

use {
    fkys_rs::eval,
    std::io::{BufWriter, stdout},
};

let mut handle = BufWriter::new(stdout());
eval(
    r"++++++++++++++++++++++++++++++++++++++++++++++os # number bam-bam
---------------os+++++++++++++o",
    &mut handle,
); // writes `46 31 44` into handle