Feat: lots of improvements

This commit is contained in:
2026-02-08 13:52:40 +01:00
parent 2c1765effa
commit f6132bdd70
34 changed files with 333 additions and 123 deletions

View File

@@ -1,5 +1,5 @@
use arc_swap::ArcSwap;
use cagire::forth::{Dictionary, Forth, Rng, StepContext, Value, Variables};
use cagire::forth::{Dictionary, ExecutionTrace, Forth, Rng, StepContext, Value, Variables};
use parking_lot::Mutex;
use rand::rngs::StdRng;
use rand::SeedableRng;
@@ -140,3 +140,11 @@ pub fn expect_outputs(script: &str, count: usize) -> Vec<String> {
assert_eq!(outputs.len(), count, "expected {} outputs", count);
outputs
}
pub fn run_with_trace(script: &str) -> (Forth, ExecutionTrace) {
let f = forth();
let mut trace = ExecutionTrace::default();
f.evaluate_with_trace(script, &default_ctx(), &mut trace)
.unwrap();
(f, trace)
}