rl_lang/docs/entries/stdlib/rl/
eval_isolated.rs1use crate::docs::entry::FnEntry;
2
3pub static EVAL_ISOLATED: FnEntry = FnEntry {
4 signature: "eval_isolated(code)",
5 description: "parses and runs a string of rl source code in a brand new interpreter with its own scope and stdlib, with no access to the calling program's variables; returns everything the code printed",
6 example: "get std::rl::eval_isolated\n\neval_isolated(\"println(1 + 1)\") // ok(\"2\\n\")",
7 expected_output: None,
8 returns: "Result[string]",
9 errors: Some("returns an error message if the code fails to parse or run"),
10 see_also: &["eval", "check"],
11 since: None,
12};