Switch to more generic implementation.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/// Create iterators for ast nodes where it only has to iterate over children
|
||||
macro_rules! compare_properties {
|
||||
($emacs:expr, $($emacs_field:expr, $rust_value:expr, $compare_fn: ident),+) => {
|
||||
($emacs:expr, $rust:expr, $($emacs_field:expr, $rust_value_getter:expr, $compare_fn: ident),+) => {
|
||||
{
|
||||
let mut this_status = DiffStatus::Good;
|
||||
let mut message: Option<String> = None;
|
||||
@@ -57,7 +57,7 @@ macro_rules! compare_properties {
|
||||
name
|
||||
},
|
||||
};
|
||||
let result = $compare_fn($emacs, emacs_name, $rust_value)?;
|
||||
let result = $compare_fn($emacs, $rust, emacs_name, $rust_value_getter)?;
|
||||
match result {
|
||||
Some((DiffStatus::Good, _)) => unreachable!("No comparison functions should return Some() when DiffStatus is good."),
|
||||
Some((status, msg)) => {
|
||||
|
||||
Reference in New Issue
Block a user