Implement comparison for optional pair.
This commit is contained in:
@@ -2,6 +2,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_optional_pair;
|
||||
use super::compare_field::compare_property_quoted_string;
|
||||
use super::compare_field::ComparePropertiesResult;
|
||||
use super::diff::DiffEntry;
|
||||
@@ -377,6 +378,14 @@ where
|
||||
ret.push(diff);
|
||||
}
|
||||
AffiliatedKeywordValue::OptionalPair { optval, val } => {
|
||||
let diff = compare_property_optional_pair(
|
||||
source,
|
||||
emacs,
|
||||
rust,
|
||||
emacs_property_name.as_str(),
|
||||
|_| Some((*optval, *val)),
|
||||
)?;
|
||||
ret.push(diff);
|
||||
// todo
|
||||
}
|
||||
AffiliatedKeywordValue::ObjectTree(_) => {
|
||||
|
||||
Reference in New Issue
Block a user