feat: implement SCC analysis; refactor test; rename js helper functions
This commit is contained in:
16
nix-js/benches/utils.rs
Normal file
16
nix-js/benches/utils.rs
Normal file
@@ -0,0 +1,16 @@
|
||||
#![allow(dead_code)]
|
||||
|
||||
use nix_js::context::Context;
|
||||
use nix_js::value::Value;
|
||||
|
||||
pub fn eval(expr: &str) -> Value {
|
||||
Context::new().unwrap().eval_code(expr).unwrap()
|
||||
}
|
||||
|
||||
pub fn eval_result(expr: &str) -> Result<Value, nix_js::error::Error> {
|
||||
Context::new().unwrap().eval_code(expr)
|
||||
}
|
||||
|
||||
pub fn compile(expr: &str) -> String {
|
||||
Context::new().unwrap().compile_code(expr).unwrap()
|
||||
}
|
||||
Reference in New Issue
Block a user