Function parsley::run

source · []
pub fn run(code: &str) -> Result
Expand description

Run a code snippet in the base context.

Example

use parsley::prelude::*;

assert!(run("x").is_err());
assert!(run("null").is_ok());
assert_eq!(run("null").unwrap(), SExp::Null);

Errors

An error will be returned if the provided program is invalid or cannot terminate.