diff --git a/src/compare/util.rs b/src/compare/util.rs index 4bfefa09..db160482 100644 --- a/src/compare/util.rs +++ b/src/compare/util.rs @@ -354,39 +354,44 @@ where let mut ret = Vec::new(); let affiliated_keywords = rust.get_affiliated_keywords(); for (rust_name, rust_value) in affiliated_keywords.keywords.iter() { - // let emacs_property_name = format!(":{}", rust_name); - // match rust_value { - // AffiliatedKeywordValue::SingleString(rust_value) => { - // let diff = compare_property_quoted_string( - // source, - // emacs, - // rust, - // emacs_property_name.as_str(), - // |_| Some(*rust_value), - // )?; - // ret.push(diff); - // } - // AffiliatedKeywordValue::ListOfStrings(rust_value) => { - // let diff = compare_property_list_of_quoted_string( - // source, - // emacs, - // rust, - // emacs_property_name.as_str(), - // |_| Some(rust_value.iter()), - // )?; - // ret.push(diff); - // } - // 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); - // } - // }; + let emacs_property_name = format!(":{}", rust_name); + match rust_value { + AffiliatedKeywordValue::SingleString(rust_value) => { + let diff = compare_property_quoted_string( + source, + emacs, + rust, + emacs_property_name.as_str(), + |_| Some(*rust_value), + )?; + ret.push(diff); + } + AffiliatedKeywordValue::ListOfStrings(rust_value) => { + let diff = compare_property_list_of_quoted_string( + source, + emacs, + rust, + emacs_property_name.as_str(), + |_| Some(rust_value.iter()), + )?; + ret.push(diff); + } + AffiliatedKeywordValue::OptionalPair { optval, val } => { + // 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); + // } + }; } Ok(ret) }