Implement comparison for object tree.

This commit is contained in:
Tom Alexander
2023-10-16 12:50:53 -04:00
parent 33800c4a88
commit 0aa746fb1e
3 changed files with 87 additions and 114 deletions

View File

@@ -1,7 +1,7 @@
use std::str::FromStr;
use super::compare_field::compare_property_list_of_list_of_list_of_ast_nodes;
use super::compare_field::compare_property_list_of_quoted_string;
use super::compare_field::compare_property_object_tree;
use super::compare_field::compare_property_optional_pair;
use super::compare_field::compare_property_quoted_string;
use super::compare_field::ComparePropertiesResult;
@@ -386,20 +386,17 @@ where
|_| Some((*optval, *val)),
)?;
ret.push(diff);
// todo
}
AffiliatedKeywordValue::ObjectTree(_) => {
// todo
} // AffiliatedKeywordValue::ListOfListsOfObjects(rust_value) => {
// let diff = compare_property_list_of_list_of_list_of_ast_nodes(
// source,
// emacs,
// rust,
// emacs_property_name.as_str(),
// |_| Some(rust_value),
// )?;
// ret.push(diff);
// }
AffiliatedKeywordValue::ObjectTree(rust_value) => {
let diff = compare_property_object_tree(
source,
emacs,
rust,
emacs_property_name.as_str(),
|_| Some(rust_value.iter()),
)?;
ret.push(diff);
}
};
}
Ok(ret)