1
0
forked from M-Labs/nac3

Remove commented evaluate_cmp_op function

This commit is contained in:
ram 2024-12-05 09:56:24 +00:00
parent 887f24093f
commit 914e3ba096

View File

@ -147,26 +147,6 @@ impl SymbolValue {
}
}
// pub fn evaluate_cmp_op(
// &self,
// op: &Cmpop,
// other: &SymbolValue,
// ) -> Result<SymbolValue, String> {
// match (self, other, op) {
// // // Integer comparisons
// // (SymbolValue::I32(a), SymbolValue::I32(b), Cmpop::Eq) => Ok(SymbolValue::Bool(a == b)),
// // (SymbolValue::I32(a), SymbolValue::I32(b), Cmpop::NotEq) => Ok(SymbolValue::Bool(a != b)),
// // String comparisons
// (SymbolValue::Str(a), SymbolValue::Str(b), Cmpop::Eq) => Ok(SymbolValue::Bool(a == b)),
// (SymbolValue::Str(a), SymbolValue::Str(b), Cmpop::NotEq) => Ok(SymbolValue::Bool(a != b)),
// // Add other types and comparison operators as needed
// _ => Err(format!(
// "Unsupported comparison operation for {:?} and {:?} with operator {:?}",
// self, other, op
// )),
// }
// }
/// Returns the [`Type`] representing the data type of this value.
pub fn get_type(&self, primitives: &PrimitiveStore, unifier: &mut Unifier) -> Type {
match self {