cl-interpret: Change struct layout, add rudimentary operator overloading

This commit is contained in:
2025-09-29 11:48:30 -04:00
parent f41e5fc49a
commit df9973b119
5 changed files with 138 additions and 112 deletions

View File

@@ -43,10 +43,7 @@ pub mod constructor {
fn call(&self, _env: &mut Environment, args: &[ConValue]) -> IResult<ConValue> {
let &Self { name, arity } = self;
if arity as usize == args.len() {
Ok(ConValue::TupleStruct(Box::new((
name.to_ref(),
args.into(),
))))
Ok(ConValue::TupleStruct(name, Box::new(args.into())))
} else {
Err(Error::ArgNumber(arity as usize, args.len()))
}