cl-interpret: String-building addition

Note: This drastically increases the number of symbols. Yeowch.
This commit is contained in:
John 2024-07-09 06:14:44 -05:00
parent b446677eda
commit d723f7cece

View File

@ -209,6 +209,10 @@ pub mod convalue {
(ConValue::Empty, ConValue::Empty) => ConValue::Empty,
(ConValue::Int(a), ConValue::Int(b)) => ConValue::Int(a.wrapping_add(b)),
(ConValue::String(a), ConValue::String(b)) => (a.to_string() + &b.to_string()).into(),
(ConValue::String(s), ConValue::Char(c)) => { let mut s = s.to_string(); s.push(c); s.into() }
(ConValue::Char(a), ConValue::Char(b)) => {
ConValue::String([a, b].into_iter().collect::<String>().into())
}
_ => Err(Error::TypeError)?
]
BitAnd: bitand = [