compare_properties property drawer.
This commit is contained in:
parent
5b146d7c07
commit
d1184fa1d0
@ -1589,13 +1589,28 @@ fn compare_property_drawer<'b, 's>(
|
|||||||
emacs: &'b Token<'s>,
|
emacs: &'b Token<'s>,
|
||||||
rust: &'b PropertyDrawer<'s>,
|
rust: &'b PropertyDrawer<'s>,
|
||||||
) -> Result<DiffEntry<'b, 's>, Box<dyn std::error::Error>> {
|
) -> Result<DiffEntry<'b, 's>, Box<dyn std::error::Error>> {
|
||||||
let children = emacs.as_list()?;
|
let mut this_status = DiffStatus::Good;
|
||||||
let mut child_status = Vec::new();
|
let mut child_status = Vec::new();
|
||||||
let this_status = DiffStatus::Good;
|
let mut message = None;
|
||||||
let message = None;
|
|
||||||
|
|
||||||
for (emacs_child, rust_child) in children.iter().skip(2).zip(rust.children.iter()) {
|
compare_children(
|
||||||
child_status.push(compare_ast_node(source, emacs_child, rust_child.into())?);
|
source,
|
||||||
|
emacs,
|
||||||
|
&rust.children,
|
||||||
|
&mut child_status,
|
||||||
|
&mut this_status,
|
||||||
|
&mut message,
|
||||||
|
)?;
|
||||||
|
|
||||||
|
for diff in compare_properties!(emacs) {
|
||||||
|
match diff {
|
||||||
|
ComparePropertiesResult::NoChange => {}
|
||||||
|
ComparePropertiesResult::SelfChange(new_status, new_message) => {
|
||||||
|
this_status = new_status;
|
||||||
|
message = new_message
|
||||||
|
}
|
||||||
|
ComparePropertiesResult::DiffEntry(diff_entry) => child_status.push(diff_entry),
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(DiffResult {
|
Ok(DiffResult {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user