cl-interpret: Add a new pretty-debug-printer builtin

This commit is contained in:
John 2025-01-29 04:16:28 -06:00
parent 80e1219808
commit 026681787a

View File

@ -53,6 +53,14 @@ builtins! {
Ok(args.into()) Ok(args.into())
} }
pub fn dbgp<_, args> () -> IResult<ConValue> {
let mut out = stdout().lock();
for arg in args {
writeln!(out, "{arg:#?}").ok();
}
Ok(ConValue::Empty)
}
/// Dumps info from the environment /// Dumps info from the environment
pub fn dump<env, _>() -> IResult<ConValue> { pub fn dump<env, _>() -> IResult<ConValue> {
println!("{}", *env); println!("{}", *env);
@ -104,6 +112,7 @@ builtins! {
Ok(ConValue::Empty) Ok(ConValue::Empty)
} }
} }
builtins! { builtins! {
const BINARY; const BINARY;
/// Multiplication `a * b` /// Multiplication `a * b`