feat: implement SCC analysis; refactor test; rename js helper functions

This commit is contained in:
2026-01-10 17:24:10 +08:00
parent 36ccc735f9
commit 1adb7a24a9
28 changed files with 2445 additions and 870 deletions

16
nix-js/benches/utils.rs Normal file
View 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()
}