From 78befc76657c1546e3efb2478e6953b67974074b Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Fri, 29 Dec 2023 17:31:14 -0500 Subject: [PATCH] Remove old code. --- src/wasm_test/compare.rs | 1661 -------------------------------------- src/wasm_test/logic.rs | 386 --------- src/wasm_test/mod.rs | 1 - 3 files changed, 2048 deletions(-) delete mode 100644 src/wasm_test/logic.rs diff --git a/src/wasm_test/compare.rs b/src/wasm_test/compare.rs index f1567468..45b7f161 100644 --- a/src/wasm_test/compare.rs +++ b/src/wasm_test/compare.rs @@ -612,1664 +612,3 @@ fn compare_plain_text<'e, 's, 'w>( Ok(result) } - -// pub fn old_wasm_compare_document<'b, 's, 'p>( -// source: &'s str, -// emacs: &'b Token<'s>, -// wasm: WasmDocument<'s, 'p>, -// ) -> Result, Box> { -// wasm.compare_ast_node(source, emacs) -// } - -// impl<'s, 'p, WAN: WasmElispCompare<'s, 'p>> WasmElispCompare<'s, 'p> for &WAN { -// fn compare_ast_node<'b>( -// &self, -// source: &'s str, -// emacs: &'b Token<'s>, -// ) -> Result, Box> { -// (*self).compare_ast_node(source, emacs) -// } -// } - -// impl<'s, 'p> WasmElispCompare<'s, 'p> for WasmAstNode<'s, 'p> { -// fn compare_ast_node<'b>( -// &self, -// source: &'s str, -// emacs: &'b Token<'s>, -// ) -> Result, Box> { -// match self { -// WasmAstNode::Document(inner) => inner.compare_ast_node(source, emacs), -// WasmAstNode::Headline(inner) => inner.compare_ast_node(source, emacs), -// WasmAstNode::Section(inner) => inner.compare_ast_node(source, emacs), -// WasmAstNode::Paragraph(inner) => inner.compare_ast_node(source, emacs), -// WasmAstNode::PlainList(inner) => inner.compare_ast_node(source, emacs), -// WasmAstNode::PlainListItem(inner) => inner.compare_ast_node(source, emacs), -// WasmAstNode::CenterBlock(inner) => inner.compare_ast_node(source, emacs), -// WasmAstNode::QuoteBlock(inner) => inner.compare_ast_node(source, emacs), -// WasmAstNode::SpecialBlock(inner) => inner.compare_ast_node(source, emacs), -// WasmAstNode::DynamicBlock(inner) => inner.compare_ast_node(source, emacs), -// WasmAstNode::FootnoteDefinition(inner) => inner.compare_ast_node(source, emacs), -// WasmAstNode::Comment(inner) => inner.compare_ast_node(source, emacs), -// WasmAstNode::Drawer(inner) => inner.compare_ast_node(source, emacs), -// WasmAstNode::PropertyDrawer(inner) => inner.compare_ast_node(source, emacs), -// WasmAstNode::NodeProperty(inner) => inner.compare_ast_node(source, emacs), -// WasmAstNode::Table(inner) => inner.compare_ast_node(source, emacs), -// WasmAstNode::TableRow(inner) => inner.compare_ast_node(source, emacs), -// WasmAstNode::VerseBlock(inner) => inner.compare_ast_node(source, emacs), -// WasmAstNode::CommentBlock(inner) => inner.compare_ast_node(source, emacs), -// WasmAstNode::ExampleBlock(inner) => inner.compare_ast_node(source, emacs), -// WasmAstNode::ExportBlock(inner) => inner.compare_ast_node(source, emacs), -// WasmAstNode::SrcBlock(inner) => inner.compare_ast_node(source, emacs), -// WasmAstNode::Clock(inner) => inner.compare_ast_node(source, emacs), -// WasmAstNode::DiarySexp(inner) => inner.compare_ast_node(source, emacs), -// WasmAstNode::Planning(inner) => inner.compare_ast_node(source, emacs), -// WasmAstNode::FixedWidthArea(inner) => inner.compare_ast_node(source, emacs), -// WasmAstNode::HorizontalRule(inner) => inner.compare_ast_node(source, emacs), -// WasmAstNode::Keyword(inner) => inner.compare_ast_node(source, emacs), -// WasmAstNode::BabelCall(inner) => inner.compare_ast_node(source, emacs), -// WasmAstNode::LatexEnvironment(inner) => inner.compare_ast_node(source, emacs), -// WasmAstNode::Bold(inner) => inner.compare_ast_node(source, emacs), -// WasmAstNode::Italic(inner) => inner.compare_ast_node(source, emacs), -// WasmAstNode::Underline(inner) => inner.compare_ast_node(source, emacs), -// WasmAstNode::StrikeThrough(inner) => inner.compare_ast_node(source, emacs), -// WasmAstNode::Code(inner) => inner.compare_ast_node(source, emacs), -// WasmAstNode::Verbatim(inner) => inner.compare_ast_node(source, emacs), -// WasmAstNode::PlainText(inner) => inner.compare_ast_node(source, emacs), -// WasmAstNode::RegularLink(inner) => inner.compare_ast_node(source, emacs), -// WasmAstNode::RadioLink(inner) => inner.compare_ast_node(source, emacs), -// WasmAstNode::RadioTarget(inner) => inner.compare_ast_node(source, emacs), -// WasmAstNode::PlainLink(inner) => inner.compare_ast_node(source, emacs), -// WasmAstNode::AngleLink(inner) => inner.compare_ast_node(source, emacs), -// WasmAstNode::OrgMacro(inner) => inner.compare_ast_node(source, emacs), -// WasmAstNode::Entity(inner) => inner.compare_ast_node(source, emacs), -// WasmAstNode::LatexFragment(inner) => inner.compare_ast_node(source, emacs), -// WasmAstNode::ExportSnippet(inner) => inner.compare_ast_node(source, emacs), -// WasmAstNode::FootnoteReference(inner) => inner.compare_ast_node(source, emacs), -// WasmAstNode::Citation(inner) => inner.compare_ast_node(source, emacs), -// WasmAstNode::CitationReference(inner) => inner.compare_ast_node(source, emacs), -// WasmAstNode::InlineBabelCall(inner) => inner.compare_ast_node(source, emacs), -// WasmAstNode::InlineSourceBlock(inner) => inner.compare_ast_node(source, emacs), -// WasmAstNode::LineBreak(inner) => inner.compare_ast_node(source, emacs), -// WasmAstNode::Target(inner) => inner.compare_ast_node(source, emacs), -// WasmAstNode::StatisticsCookie(inner) => inner.compare_ast_node(source, emacs), -// WasmAstNode::Subscript(inner) => inner.compare_ast_node(source, emacs), -// WasmAstNode::Superscript(inner) => inner.compare_ast_node(source, emacs), -// WasmAstNode::TableCell(inner) => inner.compare_ast_node(source, emacs), -// WasmAstNode::Timestamp(inner) => inner.compare_ast_node(source, emacs), -// } -// } -// } - -// impl<'s, 'p> WasmElispCompare<'s, 'p> for WasmDocument<'s, 'p> { -// fn compare_ast_node<'b>( -// &self, -// source: &'s str, -// emacs: &'b Token<'s>, -// ) -> Result, Box> { -// let result = wasm_compare!( -// source, -// emacs, -// self, -// ( -// EmacsField::Required(":path"), -// |w| w.path.as_ref().and_then(|p| p.to_str()), -// wasm_compare_property_quoted_string -// ), -// ( -// EmacsField::Required(":CATEGORY"), -// |w| w.category.as_ref(), -// wasm_compare_property_quoted_string -// ) -// ); -// Ok(result) -// } -// } - -// impl<'s, 'p> WasmElispCompare<'s, 'p> for WasmHeadline<'s, 'p> { -// fn compare_ast_node<'b>( -// &self, -// source: &'s str, -// emacs: &'b Token<'s>, -// ) -> Result, Box> { -// // TODO: Implement this. -// let result = WasmDiffResult::default(); -// // let result = wasm_compare!( -// // source, -// // emacs, -// // self, -// // ( -// // EmacsField::Required(":path"), -// // |w| w.path.as_ref().and_then(|p| p.to_str()), -// // wasm_compare_property_quoted_string -// // ), -// // ( -// // EmacsField::Required(":CATEGORY"), -// // |w| w.category.as_ref(), -// // wasm_compare_property_quoted_string -// // ) -// // ); - -// Ok(result) -// } -// } - -// impl<'s, 'p> WasmElispCompare<'s, 'p> for WasmSection<'s, 'p> { -// fn compare_ast_node<'b>( -// &self, -// source: &'s str, -// emacs: &'b Token<'s>, -// ) -> Result, Box> { -// let result = wasm_compare!(source, emacs, self,); - -// Ok(result) -// } -// } - -// impl<'s, 'p> WasmElispCompare<'s, 'p> for WasmParagraph<'s, 'p> { -// fn compare_ast_node<'b>( -// &self, -// source: &'s str, -// emacs: &'b Token<'s>, -// ) -> Result, Box> { -// let result = wasm_compare!(source, emacs, self,); - -// Ok(result) -// } -// } - -// impl<'s, 'p> WasmElispCompare<'s, 'p> for WasmPlainList<'s, 'p> { -// fn compare_ast_node<'b>( -// &self, -// source: &'s str, -// emacs: &'b Token<'s>, -// ) -> Result, Box> { -// // TODO: Implement this. -// let result = WasmDiffResult::default(); -// // let result = wasm_compare!( -// // source, -// // emacs, -// // self, -// // ( -// // EmacsField::Required(":path"), -// // |w| w.path.as_ref().and_then(|p| p.to_str()), -// // wasm_compare_property_quoted_string -// // ), -// // ( -// // EmacsField::Required(":CATEGORY"), -// // |w| w.category.as_ref(), -// // wasm_compare_property_quoted_string -// // ) -// // ); - -// Ok(result) -// } -// } - -// impl<'s, 'p> WasmElispCompare<'s, 'p> for WasmPlainListItem<'s, 'p> { -// fn compare_ast_node<'b>( -// &self, -// source: &'s str, -// emacs: &'b Token<'s>, -// ) -> Result, Box> { -// // TODO: Implement this. -// let result = WasmDiffResult::default(); -// // let result = wasm_compare!( -// // source, -// // emacs, -// // self, -// // ( -// // EmacsField::Required(":path"), -// // |w| w.path.as_ref().and_then(|p| p.to_str()), -// // wasm_compare_property_quoted_string -// // ), -// // ( -// // EmacsField::Required(":CATEGORY"), -// // |w| w.category.as_ref(), -// // wasm_compare_property_quoted_string -// // ) -// // ); - -// Ok(result) -// } -// } - -// impl<'s, 'p> WasmElispCompare<'s, 'p> for WasmCenterBlock<'s, 'p> { -// fn compare_ast_node<'b>( -// &self, -// source: &'s str, -// emacs: &'b Token<'s>, -// ) -> Result, Box> { -// // TODO: Implement this. -// let result = WasmDiffResult::default(); -// // let result = wasm_compare!( -// // source, -// // emacs, -// // self, -// // ( -// // EmacsField::Required(":path"), -// // |w| w.path.as_ref().and_then(|p| p.to_str()), -// // wasm_compare_property_quoted_string -// // ), -// // ( -// // EmacsField::Required(":CATEGORY"), -// // |w| w.category.as_ref(), -// // wasm_compare_property_quoted_string -// // ) -// // ); - -// Ok(result) -// } -// } - -// impl<'s, 'p> WasmElispCompare<'s, 'p> for WasmQuoteBlock<'s, 'p> { -// fn compare_ast_node<'b>( -// &self, -// source: &'s str, -// emacs: &'b Token<'s>, -// ) -> Result, Box> { -// // TODO: Implement this. -// let result = WasmDiffResult::default(); -// // let result = wasm_compare!( -// // source, -// // emacs, -// // self, -// // ( -// // EmacsField::Required(":path"), -// // |w| w.path.as_ref().and_then(|p| p.to_str()), -// // wasm_compare_property_quoted_string -// // ), -// // ( -// // EmacsField::Required(":CATEGORY"), -// // |w| w.category.as_ref(), -// // wasm_compare_property_quoted_string -// // ) -// // ); - -// Ok(result) -// } -// } - -// impl<'s, 'p> WasmElispCompare<'s, 'p> for WasmSpecialBlock<'s, 'p> { -// fn compare_ast_node<'b>( -// &self, -// source: &'s str, -// emacs: &'b Token<'s>, -// ) -> Result, Box> { -// // TODO: Implement this. -// let result = WasmDiffResult::default(); -// // let result = wasm_compare!( -// // source, -// // emacs, -// // self, -// // ( -// // EmacsField::Required(":path"), -// // |w| w.path.as_ref().and_then(|p| p.to_str()), -// // wasm_compare_property_quoted_string -// // ), -// // ( -// // EmacsField::Required(":CATEGORY"), -// // |w| w.category.as_ref(), -// // wasm_compare_property_quoted_string -// // ) -// // ); - -// Ok(result) -// } -// } - -// impl<'s, 'p> WasmElispCompare<'s, 'p> for WasmDynamicBlock<'s, 'p> { -// fn compare_ast_node<'b>( -// &self, -// source: &'s str, -// emacs: &'b Token<'s>, -// ) -> Result, Box> { -// // TODO: Implement this. -// let result = WasmDiffResult::default(); -// // let result = wasm_compare!( -// // source, -// // emacs, -// // self, -// // ( -// // EmacsField::Required(":path"), -// // |w| w.path.as_ref().and_then(|p| p.to_str()), -// // wasm_compare_property_quoted_string -// // ), -// // ( -// // EmacsField::Required(":CATEGORY"), -// // |w| w.category.as_ref(), -// // wasm_compare_property_quoted_string -// // ) -// // ); - -// Ok(result) -// } -// } - -// impl<'s, 'p> WasmElispCompare<'s, 'p> for WasmFootnoteDefinition<'s, 'p> { -// fn compare_ast_node<'b>( -// &self, -// source: &'s str, -// emacs: &'b Token<'s>, -// ) -> Result, Box> { -// // TODO: Implement this. -// let result = WasmDiffResult::default(); -// // let result = wasm_compare!( -// // source, -// // emacs, -// // self, -// // ( -// // EmacsField::Required(":path"), -// // |w| w.path.as_ref().and_then(|p| p.to_str()), -// // wasm_compare_property_quoted_string -// // ), -// // ( -// // EmacsField::Required(":CATEGORY"), -// // |w| w.category.as_ref(), -// // wasm_compare_property_quoted_string -// // ) -// // ); - -// Ok(result) -// } -// } - -// impl<'s, 'p> WasmElispCompare<'s, 'p> for WasmComment<'s, 'p> { -// fn compare_ast_node<'b>( -// &self, -// source: &'s str, -// emacs: &'b Token<'s>, -// ) -> Result, Box> { -// // TODO: Implement this. -// let result = WasmDiffResult::default(); -// // let result = wasm_compare!( -// // source, -// // emacs, -// // self, -// // ( -// // EmacsField::Required(":path"), -// // |w| w.path.as_ref().and_then(|p| p.to_str()), -// // wasm_compare_property_quoted_string -// // ), -// // ( -// // EmacsField::Required(":CATEGORY"), -// // |w| w.category.as_ref(), -// // wasm_compare_property_quoted_string -// // ) -// // ); - -// Ok(result) -// } -// } - -// impl<'s, 'p> WasmElispCompare<'s, 'p> for WasmDrawer<'s, 'p> { -// fn compare_ast_node<'b>( -// &self, -// source: &'s str, -// emacs: &'b Token<'s>, -// ) -> Result, Box> { -// // TODO: Implement this. -// let result = WasmDiffResult::default(); -// // let result = wasm_compare!( -// // source, -// // emacs, -// // self, -// // ( -// // EmacsField::Required(":path"), -// // |w| w.path.as_ref().and_then(|p| p.to_str()), -// // wasm_compare_property_quoted_string -// // ), -// // ( -// // EmacsField::Required(":CATEGORY"), -// // |w| w.category.as_ref(), -// // wasm_compare_property_quoted_string -// // ) -// // ); - -// Ok(result) -// } -// } - -// impl<'s, 'p> WasmElispCompare<'s, 'p> for WasmPropertyDrawer<'s, 'p> { -// fn compare_ast_node<'b>( -// &self, -// source: &'s str, -// emacs: &'b Token<'s>, -// ) -> Result, Box> { -// // TODO: Implement this. -// let result = WasmDiffResult::default(); -// // let result = wasm_compare!( -// // source, -// // emacs, -// // self, -// // ( -// // EmacsField::Required(":path"), -// // |w| w.path.as_ref().and_then(|p| p.to_str()), -// // wasm_compare_property_quoted_string -// // ), -// // ( -// // EmacsField::Required(":CATEGORY"), -// // |w| w.category.as_ref(), -// // wasm_compare_property_quoted_string -// // ) -// // ); - -// Ok(result) -// } -// } - -// impl<'s, 'p> WasmElispCompare<'s, 'p> for WasmNodeProperty<'s, 'p> { -// fn compare_ast_node<'b>( -// &self, -// source: &'s str, -// emacs: &'b Token<'s>, -// ) -> Result, Box> { -// // TODO: Implement this. -// let result = WasmDiffResult::default(); -// // let result = wasm_compare!( -// // source, -// // emacs, -// // self, -// // ( -// // EmacsField::Required(":path"), -// // |w| w.path.as_ref().and_then(|p| p.to_str()), -// // wasm_compare_property_quoted_string -// // ), -// // ( -// // EmacsField::Required(":CATEGORY"), -// // |w| w.category.as_ref(), -// // wasm_compare_property_quoted_string -// // ) -// // ); - -// Ok(result) -// } -// } - -// impl<'s, 'p> WasmElispCompare<'s, 'p> for WasmTable<'s, 'p> { -// fn compare_ast_node<'b>( -// &self, -// source: &'s str, -// emacs: &'b Token<'s>, -// ) -> Result, Box> { -// // TODO: Implement this. -// let result = WasmDiffResult::default(); -// // let result = wasm_compare!( -// // source, -// // emacs, -// // self, -// // ( -// // EmacsField::Required(":path"), -// // |w| w.path.as_ref().and_then(|p| p.to_str()), -// // wasm_compare_property_quoted_string -// // ), -// // ( -// // EmacsField::Required(":CATEGORY"), -// // |w| w.category.as_ref(), -// // wasm_compare_property_quoted_string -// // ) -// // ); - -// Ok(result) -// } -// } - -// impl<'s, 'p> WasmElispCompare<'s, 'p> for WasmTableRow<'s, 'p> { -// fn compare_ast_node<'b>( -// &self, -// source: &'s str, -// emacs: &'b Token<'s>, -// ) -> Result, Box> { -// // TODO: Implement this. -// let result = WasmDiffResult::default(); -// // let result = wasm_compare!( -// // source, -// // emacs, -// // self, -// // ( -// // EmacsField::Required(":path"), -// // |w| w.path.as_ref().and_then(|p| p.to_str()), -// // wasm_compare_property_quoted_string -// // ), -// // ( -// // EmacsField::Required(":CATEGORY"), -// // |w| w.category.as_ref(), -// // wasm_compare_property_quoted_string -// // ) -// // ); - -// Ok(result) -// } -// } - -// impl<'s, 'p> WasmElispCompare<'s, 'p> for WasmVerseBlock<'s, 'p> { -// fn compare_ast_node<'b>( -// &self, -// source: &'s str, -// emacs: &'b Token<'s>, -// ) -> Result, Box> { -// // TODO: Implement this. -// let result = WasmDiffResult::default(); -// // let result = wasm_compare!( -// // source, -// // emacs, -// // self, -// // ( -// // EmacsField::Required(":path"), -// // |w| w.path.as_ref().and_then(|p| p.to_str()), -// // wasm_compare_property_quoted_string -// // ), -// // ( -// // EmacsField::Required(":CATEGORY"), -// // |w| w.category.as_ref(), -// // wasm_compare_property_quoted_string -// // ) -// // ); - -// Ok(result) -// } -// } - -// impl<'s, 'p> WasmElispCompare<'s, 'p> for WasmCommentBlock<'s, 'p> { -// fn compare_ast_node<'b>( -// &self, -// source: &'s str, -// emacs: &'b Token<'s>, -// ) -> Result, Box> { -// // TODO: Implement this. -// let result = WasmDiffResult::default(); -// // let result = wasm_compare!( -// // source, -// // emacs, -// // self, -// // ( -// // EmacsField::Required(":path"), -// // |w| w.path.as_ref().and_then(|p| p.to_str()), -// // wasm_compare_property_quoted_string -// // ), -// // ( -// // EmacsField::Required(":CATEGORY"), -// // |w| w.category.as_ref(), -// // wasm_compare_property_quoted_string -// // ) -// // ); - -// Ok(result) -// } -// } - -// impl<'s, 'p> WasmElispCompare<'s, 'p> for WasmExampleBlock<'s, 'p> { -// fn compare_ast_node<'b>( -// &self, -// source: &'s str, -// emacs: &'b Token<'s>, -// ) -> Result, Box> { -// // TODO: Implement this. -// let result = WasmDiffResult::default(); -// // let result = wasm_compare!( -// // source, -// // emacs, -// // self, -// // ( -// // EmacsField::Required(":path"), -// // |w| w.path.as_ref().and_then(|p| p.to_str()), -// // wasm_compare_property_quoted_string -// // ), -// // ( -// // EmacsField::Required(":CATEGORY"), -// // |w| w.category.as_ref(), -// // wasm_compare_property_quoted_string -// // ) -// // ); - -// Ok(result) -// } -// } - -// impl<'s, 'p> WasmElispCompare<'s, 'p> for WasmExportBlock<'s, 'p> { -// fn compare_ast_node<'b>( -// &self, -// source: &'s str, -// emacs: &'b Token<'s>, -// ) -> Result, Box> { -// // TODO: Implement this. -// let result = WasmDiffResult::default(); -// // let result = wasm_compare!( -// // source, -// // emacs, -// // self, -// // ( -// // EmacsField::Required(":path"), -// // |w| w.path.as_ref().and_then(|p| p.to_str()), -// // wasm_compare_property_quoted_string -// // ), -// // ( -// // EmacsField::Required(":CATEGORY"), -// // |w| w.category.as_ref(), -// // wasm_compare_property_quoted_string -// // ) -// // ); - -// Ok(result) -// } -// } - -// impl<'s, 'p> WasmElispCompare<'s, 'p> for WasmSrcBlock<'s, 'p> { -// fn compare_ast_node<'b>( -// &self, -// source: &'s str, -// emacs: &'b Token<'s>, -// ) -> Result, Box> { -// // TODO: Implement this. -// let result = WasmDiffResult::default(); -// // let result = wasm_compare!( -// // source, -// // emacs, -// // self, -// // ( -// // EmacsField::Required(":path"), -// // |w| w.path.as_ref().and_then(|p| p.to_str()), -// // wasm_compare_property_quoted_string -// // ), -// // ( -// // EmacsField::Required(":CATEGORY"), -// // |w| w.category.as_ref(), -// // wasm_compare_property_quoted_string -// // ) -// // ); - -// Ok(result) -// } -// } - -// impl<'s, 'p> WasmElispCompare<'s, 'p> for WasmClock<'s, 'p> { -// fn compare_ast_node<'b>( -// &self, -// source: &'s str, -// emacs: &'b Token<'s>, -// ) -> Result, Box> { -// // TODO: Implement this. -// let result = WasmDiffResult::default(); -// // let result = wasm_compare!( -// // source, -// // emacs, -// // self, -// // ( -// // EmacsField::Required(":path"), -// // |w| w.path.as_ref().and_then(|p| p.to_str()), -// // wasm_compare_property_quoted_string -// // ), -// // ( -// // EmacsField::Required(":CATEGORY"), -// // |w| w.category.as_ref(), -// // wasm_compare_property_quoted_string -// // ) -// // ); - -// Ok(result) -// } -// } - -// impl<'s, 'p> WasmElispCompare<'s, 'p> for WasmDiarySexp<'s, 'p> { -// fn compare_ast_node<'b>( -// &self, -// source: &'s str, -// emacs: &'b Token<'s>, -// ) -> Result, Box> { -// // TODO: Implement this. -// let result = WasmDiffResult::default(); -// // let result = wasm_compare!( -// // source, -// // emacs, -// // self, -// // ( -// // EmacsField::Required(":path"), -// // |w| w.path.as_ref().and_then(|p| p.to_str()), -// // wasm_compare_property_quoted_string -// // ), -// // ( -// // EmacsField::Required(":CATEGORY"), -// // |w| w.category.as_ref(), -// // wasm_compare_property_quoted_string -// // ) -// // ); - -// Ok(result) -// } -// } - -// impl<'s, 'p> WasmElispCompare<'s, 'p> for WasmPlanning<'s, 'p> { -// fn compare_ast_node<'b>( -// &self, -// source: &'s str, -// emacs: &'b Token<'s>, -// ) -> Result, Box> { -// // TODO: Implement this. -// let result = WasmDiffResult::default(); -// // let result = wasm_compare!( -// // source, -// // emacs, -// // self, -// // ( -// // EmacsField::Required(":path"), -// // |w| w.path.as_ref().and_then(|p| p.to_str()), -// // wasm_compare_property_quoted_string -// // ), -// // ( -// // EmacsField::Required(":CATEGORY"), -// // |w| w.category.as_ref(), -// // wasm_compare_property_quoted_string -// // ) -// // ); - -// Ok(result) -// } -// } - -// impl<'s, 'p> WasmElispCompare<'s, 'p> for WasmFixedWidthArea<'s, 'p> { -// fn compare_ast_node<'b>( -// &self, -// source: &'s str, -// emacs: &'b Token<'s>, -// ) -> Result, Box> { -// // TODO: Implement this. -// let result = WasmDiffResult::default(); -// // let result = wasm_compare!( -// // source, -// // emacs, -// // self, -// // ( -// // EmacsField::Required(":path"), -// // |w| w.path.as_ref().and_then(|p| p.to_str()), -// // wasm_compare_property_quoted_string -// // ), -// // ( -// // EmacsField::Required(":CATEGORY"), -// // |w| w.category.as_ref(), -// // wasm_compare_property_quoted_string -// // ) -// // ); - -// Ok(result) -// } -// } - -// impl<'s, 'p> WasmElispCompare<'s, 'p> for WasmHorizontalRule<'s, 'p> { -// fn compare_ast_node<'b>( -// &self, -// source: &'s str, -// emacs: &'b Token<'s>, -// ) -> Result, Box> { -// // TODO: Implement this. -// let result = WasmDiffResult::default(); -// // let result = wasm_compare!( -// // source, -// // emacs, -// // self, -// // ( -// // EmacsField::Required(":path"), -// // |w| w.path.as_ref().and_then(|p| p.to_str()), -// // wasm_compare_property_quoted_string -// // ), -// // ( -// // EmacsField::Required(":CATEGORY"), -// // |w| w.category.as_ref(), -// // wasm_compare_property_quoted_string -// // ) -// // ); - -// Ok(result) -// } -// } - -// impl<'s, 'p> WasmElispCompare<'s, 'p> for WasmKeyword<'s, 'p> { -// fn compare_ast_node<'b>( -// &self, -// source: &'s str, -// emacs: &'b Token<'s>, -// ) -> Result, Box> { -// // TODO: Implement this. -// let result = WasmDiffResult::default(); -// // let result = wasm_compare!( -// // source, -// // emacs, -// // self, -// // ( -// // EmacsField::Required(":path"), -// // |w| w.path.as_ref().and_then(|p| p.to_str()), -// // wasm_compare_property_quoted_string -// // ), -// // ( -// // EmacsField::Required(":CATEGORY"), -// // |w| w.category.as_ref(), -// // wasm_compare_property_quoted_string -// // ) -// // ); - -// Ok(result) -// } -// } - -// impl<'s, 'p> WasmElispCompare<'s, 'p> for WasmBabelCall<'s, 'p> { -// fn compare_ast_node<'b>( -// &self, -// source: &'s str, -// emacs: &'b Token<'s>, -// ) -> Result, Box> { -// // TODO: Implement this. -// let result = WasmDiffResult::default(); -// // let result = wasm_compare!( -// // source, -// // emacs, -// // self, -// // ( -// // EmacsField::Required(":path"), -// // |w| w.path.as_ref().and_then(|p| p.to_str()), -// // wasm_compare_property_quoted_string -// // ), -// // ( -// // EmacsField::Required(":CATEGORY"), -// // |w| w.category.as_ref(), -// // wasm_compare_property_quoted_string -// // ) -// // ); - -// Ok(result) -// } -// } - -// impl<'s, 'p> WasmElispCompare<'s, 'p> for WasmLatexEnvironment<'s, 'p> { -// fn compare_ast_node<'b>( -// &self, -// source: &'s str, -// emacs: &'b Token<'s>, -// ) -> Result, Box> { -// // TODO: Implement this. -// let result = WasmDiffResult::default(); -// // let result = wasm_compare!( -// // source, -// // emacs, -// // self, -// // ( -// // EmacsField::Required(":path"), -// // |w| w.path.as_ref().and_then(|p| p.to_str()), -// // wasm_compare_property_quoted_string -// // ), -// // ( -// // EmacsField::Required(":CATEGORY"), -// // |w| w.category.as_ref(), -// // wasm_compare_property_quoted_string -// // ) -// // ); - -// Ok(result) -// } -// } - -// impl<'s, 'p> WasmElispCompare<'s, 'p> for WasmBold<'s, 'p> { -// fn compare_ast_node<'b>( -// &self, -// source: &'s str, -// emacs: &'b Token<'s>, -// ) -> Result, Box> { -// // TODO: Implement this. -// let result = WasmDiffResult::default(); -// // let result = wasm_compare!( -// // source, -// // emacs, -// // self, -// // ( -// // EmacsField::Required(":path"), -// // |w| w.path.as_ref().and_then(|p| p.to_str()), -// // wasm_compare_property_quoted_string -// // ), -// // ( -// // EmacsField::Required(":CATEGORY"), -// // |w| w.category.as_ref(), -// // wasm_compare_property_quoted_string -// // ) -// // ); - -// Ok(result) -// } -// } - -// impl<'s, 'p> WasmElispCompare<'s, 'p> for WasmItalic<'s, 'p> { -// fn compare_ast_node<'b>( -// &self, -// source: &'s str, -// emacs: &'b Token<'s>, -// ) -> Result, Box> { -// // TODO: Implement this. -// let result = WasmDiffResult::default(); -// // let result = wasm_compare!( -// // source, -// // emacs, -// // self, -// // ( -// // EmacsField::Required(":path"), -// // |w| w.path.as_ref().and_then(|p| p.to_str()), -// // wasm_compare_property_quoted_string -// // ), -// // ( -// // EmacsField::Required(":CATEGORY"), -// // |w| w.category.as_ref(), -// // wasm_compare_property_quoted_string -// // ) -// // ); - -// Ok(result) -// } -// } - -// impl<'s, 'p> WasmElispCompare<'s, 'p> for WasmUnderline<'s, 'p> { -// fn compare_ast_node<'b>( -// &self, -// source: &'s str, -// emacs: &'b Token<'s>, -// ) -> Result, Box> { -// // TODO: Implement this. -// let result = WasmDiffResult::default(); -// // let result = wasm_compare!( -// // source, -// // emacs, -// // self, -// // ( -// // EmacsField::Required(":path"), -// // |w| w.path.as_ref().and_then(|p| p.to_str()), -// // wasm_compare_property_quoted_string -// // ), -// // ( -// // EmacsField::Required(":CATEGORY"), -// // |w| w.category.as_ref(), -// // wasm_compare_property_quoted_string -// // ) -// // ); - -// Ok(result) -// } -// } - -// impl<'s, 'p> WasmElispCompare<'s, 'p> for WasmStrikeThrough<'s, 'p> { -// fn compare_ast_node<'b>( -// &self, -// source: &'s str, -// emacs: &'b Token<'s>, -// ) -> Result, Box> { -// // TODO: Implement this. -// let result = WasmDiffResult::default(); -// // let result = wasm_compare!( -// // source, -// // emacs, -// // self, -// // ( -// // EmacsField::Required(":path"), -// // |w| w.path.as_ref().and_then(|p| p.to_str()), -// // wasm_compare_property_quoted_string -// // ), -// // ( -// // EmacsField::Required(":CATEGORY"), -// // |w| w.category.as_ref(), -// // wasm_compare_property_quoted_string -// // ) -// // ); - -// Ok(result) -// } -// } - -// impl<'s, 'p> WasmElispCompare<'s, 'p> for WasmCode<'s, 'p> { -// fn compare_ast_node<'b>( -// &self, -// source: &'s str, -// emacs: &'b Token<'s>, -// ) -> Result, Box> { -// // TODO: Implement this. -// let result = WasmDiffResult::default(); -// // let result = wasm_compare!( -// // source, -// // emacs, -// // self, -// // ( -// // EmacsField::Required(":path"), -// // |w| w.path.as_ref().and_then(|p| p.to_str()), -// // wasm_compare_property_quoted_string -// // ), -// // ( -// // EmacsField::Required(":CATEGORY"), -// // |w| w.category.as_ref(), -// // wasm_compare_property_quoted_string -// // ) -// // ); - -// Ok(result) -// } -// } - -// impl<'s, 'p> WasmElispCompare<'s, 'p> for WasmVerbatim<'s, 'p> { -// fn compare_ast_node<'b>( -// &self, -// source: &'s str, -// emacs: &'b Token<'s>, -// ) -> Result, Box> { -// // TODO: Implement this. -// let result = WasmDiffResult::default(); -// // let result = wasm_compare!( -// // source, -// // emacs, -// // self, -// // ( -// // EmacsField::Required(":path"), -// // |w| w.path.as_ref().and_then(|p| p.to_str()), -// // wasm_compare_property_quoted_string -// // ), -// // ( -// // EmacsField::Required(":CATEGORY"), -// // |w| w.category.as_ref(), -// // wasm_compare_property_quoted_string -// // ) -// // ); - -// Ok(result) -// } -// } - -// impl<'s, 'p> WasmElispCompare<'s, 'p> for WasmPlainText<'s, 'p> { -// fn compare_ast_node<'b>( -// &self, -// source: &'s str, -// emacs: &'b Token<'s>, -// ) -> Result, Box> { -// // TODO: Implement this. -// let result = WasmDiffResult::default(); - -// Ok(result) -// } -// } - -// impl<'s, 'p> WasmElispCompare<'s, 'p> for WasmRegularLink<'s, 'p> { -// fn compare_ast_node<'b>( -// &self, -// source: &'s str, -// emacs: &'b Token<'s>, -// ) -> Result, Box> { -// // TODO: Implement this. -// let result = WasmDiffResult::default(); -// // let result = wasm_compare!( -// // source, -// // emacs, -// // self, -// // ( -// // EmacsField::Required(":path"), -// // |w| w.path.as_ref().and_then(|p| p.to_str()), -// // wasm_compare_property_quoted_string -// // ), -// // ( -// // EmacsField::Required(":CATEGORY"), -// // |w| w.category.as_ref(), -// // wasm_compare_property_quoted_string -// // ) -// // ); - -// Ok(result) -// } -// } - -// impl<'s, 'p> WasmElispCompare<'s, 'p> for WasmRadioLink<'s, 'p> { -// fn compare_ast_node<'b>( -// &self, -// source: &'s str, -// emacs: &'b Token<'s>, -// ) -> Result, Box> { -// // TODO: Implement this. -// let result = WasmDiffResult::default(); -// // let result = wasm_compare!( -// // source, -// // emacs, -// // self, -// // ( -// // EmacsField::Required(":path"), -// // |w| w.path.as_ref().and_then(|p| p.to_str()), -// // wasm_compare_property_quoted_string -// // ), -// // ( -// // EmacsField::Required(":CATEGORY"), -// // |w| w.category.as_ref(), -// // wasm_compare_property_quoted_string -// // ) -// // ); - -// Ok(result) -// } -// } - -// impl<'s, 'p> WasmElispCompare<'s, 'p> for WasmRadioTarget<'s, 'p> { -// fn compare_ast_node<'b>( -// &self, -// source: &'s str, -// emacs: &'b Token<'s>, -// ) -> Result, Box> { -// // TODO: Implement this. -// let result = WasmDiffResult::default(); -// // let result = wasm_compare!( -// // source, -// // emacs, -// // self, -// // ( -// // EmacsField::Required(":path"), -// // |w| w.path.as_ref().and_then(|p| p.to_str()), -// // wasm_compare_property_quoted_string -// // ), -// // ( -// // EmacsField::Required(":CATEGORY"), -// // |w| w.category.as_ref(), -// // wasm_compare_property_quoted_string -// // ) -// // ); - -// Ok(result) -// } -// } - -// impl<'s, 'p> WasmElispCompare<'s, 'p> for WasmPlainLink<'s, 'p> { -// fn compare_ast_node<'b>( -// &self, -// source: &'s str, -// emacs: &'b Token<'s>, -// ) -> Result, Box> { -// // TODO: Implement this. -// let result = WasmDiffResult::default(); -// // let result = wasm_compare!( -// // source, -// // emacs, -// // self, -// // ( -// // EmacsField::Required(":path"), -// // |w| w.path.as_ref().and_then(|p| p.to_str()), -// // wasm_compare_property_quoted_string -// // ), -// // ( -// // EmacsField::Required(":CATEGORY"), -// // |w| w.category.as_ref(), -// // wasm_compare_property_quoted_string -// // ) -// // ); - -// Ok(result) -// } -// } - -// impl<'s, 'p> WasmElispCompare<'s, 'p> for WasmAngleLink<'s, 'p> { -// fn compare_ast_node<'b>( -// &self, -// source: &'s str, -// emacs: &'b Token<'s>, -// ) -> Result, Box> { -// // TODO: Implement this. -// let result = WasmDiffResult::default(); -// // let result = wasm_compare!( -// // source, -// // emacs, -// // self, -// // ( -// // EmacsField::Required(":path"), -// // |w| w.path.as_ref().and_then(|p| p.to_str()), -// // wasm_compare_property_quoted_string -// // ), -// // ( -// // EmacsField::Required(":CATEGORY"), -// // |w| w.category.as_ref(), -// // wasm_compare_property_quoted_string -// // ) -// // ); - -// Ok(result) -// } -// } - -// impl<'s, 'p> WasmElispCompare<'s, 'p> for WasmOrgMacro<'s, 'p> { -// fn compare_ast_node<'b>( -// &self, -// source: &'s str, -// emacs: &'b Token<'s>, -// ) -> Result, Box> { -// // TODO: Implement this. -// let result = WasmDiffResult::default(); -// // let result = wasm_compare!( -// // source, -// // emacs, -// // self, -// // ( -// // EmacsField::Required(":path"), -// // |w| w.path.as_ref().and_then(|p| p.to_str()), -// // wasm_compare_property_quoted_string -// // ), -// // ( -// // EmacsField::Required(":CATEGORY"), -// // |w| w.category.as_ref(), -// // wasm_compare_property_quoted_string -// // ) -// // ); - -// Ok(result) -// } -// } - -// impl<'s, 'p> WasmElispCompare<'s, 'p> for WasmEntity<'s, 'p> { -// fn compare_ast_node<'b>( -// &self, -// source: &'s str, -// emacs: &'b Token<'s>, -// ) -> Result, Box> { -// // TODO: Implement this. -// let result = WasmDiffResult::default(); -// // let result = wasm_compare!( -// // source, -// // emacs, -// // self, -// // ( -// // EmacsField::Required(":path"), -// // |w| w.path.as_ref().and_then(|p| p.to_str()), -// // wasm_compare_property_quoted_string -// // ), -// // ( -// // EmacsField::Required(":CATEGORY"), -// // |w| w.category.as_ref(), -// // wasm_compare_property_quoted_string -// // ) -// // ); - -// Ok(result) -// } -// } - -// impl<'s, 'p> WasmElispCompare<'s, 'p> for WasmLatexFragment<'s, 'p> { -// fn compare_ast_node<'b>( -// &self, -// source: &'s str, -// emacs: &'b Token<'s>, -// ) -> Result, Box> { -// // TODO: Implement this. -// let result = WasmDiffResult::default(); -// // let result = wasm_compare!( -// // source, -// // emacs, -// // self, -// // ( -// // EmacsField::Required(":path"), -// // |w| w.path.as_ref().and_then(|p| p.to_str()), -// // wasm_compare_property_quoted_string -// // ), -// // ( -// // EmacsField::Required(":CATEGORY"), -// // |w| w.category.as_ref(), -// // wasm_compare_property_quoted_string -// // ) -// // ); - -// Ok(result) -// } -// } - -// impl<'s, 'p> WasmElispCompare<'s, 'p> for WasmExportSnippet<'s, 'p> { -// fn compare_ast_node<'b>( -// &self, -// source: &'s str, -// emacs: &'b Token<'s>, -// ) -> Result, Box> { -// // TODO: Implement this. -// let result = WasmDiffResult::default(); -// // let result = wasm_compare!( -// // source, -// // emacs, -// // self, -// // ( -// // EmacsField::Required(":path"), -// // |w| w.path.as_ref().and_then(|p| p.to_str()), -// // wasm_compare_property_quoted_string -// // ), -// // ( -// // EmacsField::Required(":CATEGORY"), -// // |w| w.category.as_ref(), -// // wasm_compare_property_quoted_string -// // ) -// // ); - -// Ok(result) -// } -// } - -// impl<'s, 'p> WasmElispCompare<'s, 'p> for WasmFootnoteReference<'s, 'p> { -// fn compare_ast_node<'b>( -// &self, -// source: &'s str, -// emacs: &'b Token<'s>, -// ) -> Result, Box> { -// // TODO: Implement this. -// let result = WasmDiffResult::default(); -// // let result = wasm_compare!( -// // source, -// // emacs, -// // self, -// // ( -// // EmacsField::Required(":path"), -// // |w| w.path.as_ref().and_then(|p| p.to_str()), -// // wasm_compare_property_quoted_string -// // ), -// // ( -// // EmacsField::Required(":CATEGORY"), -// // |w| w.category.as_ref(), -// // wasm_compare_property_quoted_string -// // ) -// // ); - -// Ok(result) -// } -// } - -// impl<'s, 'p> WasmElispCompare<'s, 'p> for WasmCitation<'s, 'p> { -// fn compare_ast_node<'b>( -// &self, -// source: &'s str, -// emacs: &'b Token<'s>, -// ) -> Result, Box> { -// // TODO: Implement this. -// let result = WasmDiffResult::default(); -// // let result = wasm_compare!( -// // source, -// // emacs, -// // self, -// // ( -// // EmacsField::Required(":path"), -// // |w| w.path.as_ref().and_then(|p| p.to_str()), -// // wasm_compare_property_quoted_string -// // ), -// // ( -// // EmacsField::Required(":CATEGORY"), -// // |w| w.category.as_ref(), -// // wasm_compare_property_quoted_string -// // ) -// // ); - -// Ok(result) -// } -// } - -// impl<'s, 'p> WasmElispCompare<'s, 'p> for WasmCitationReference<'s, 'p> { -// fn compare_ast_node<'b>( -// &self, -// source: &'s str, -// emacs: &'b Token<'s>, -// ) -> Result, Box> { -// // TODO: Implement this. -// let result = WasmDiffResult::default(); -// // let result = wasm_compare!( -// // source, -// // emacs, -// // self, -// // ( -// // EmacsField::Required(":path"), -// // |w| w.path.as_ref().and_then(|p| p.to_str()), -// // wasm_compare_property_quoted_string -// // ), -// // ( -// // EmacsField::Required(":CATEGORY"), -// // |w| w.category.as_ref(), -// // wasm_compare_property_quoted_string -// // ) -// // ); - -// Ok(result) -// } -// } - -// impl<'s, 'p> WasmElispCompare<'s, 'p> for WasmInlineBabelCall<'s, 'p> { -// fn compare_ast_node<'b>( -// &self, -// source: &'s str, -// emacs: &'b Token<'s>, -// ) -> Result, Box> { -// // TODO: Implement this. -// let result = WasmDiffResult::default(); -// // let result = wasm_compare!( -// // source, -// // emacs, -// // self, -// // ( -// // EmacsField::Required(":path"), -// // |w| w.path.as_ref().and_then(|p| p.to_str()), -// // wasm_compare_property_quoted_string -// // ), -// // ( -// // EmacsField::Required(":CATEGORY"), -// // |w| w.category.as_ref(), -// // wasm_compare_property_quoted_string -// // ) -// // ); - -// Ok(result) -// } -// } - -// impl<'s, 'p> WasmElispCompare<'s, 'p> for WasmInlineSourceBlock<'s, 'p> { -// fn compare_ast_node<'b>( -// &self, -// source: &'s str, -// emacs: &'b Token<'s>, -// ) -> Result, Box> { -// // TODO: Implement this. -// let result = WasmDiffResult::default(); -// // let result = wasm_compare!( -// // source, -// // emacs, -// // self, -// // ( -// // EmacsField::Required(":path"), -// // |w| w.path.as_ref().and_then(|p| p.to_str()), -// // wasm_compare_property_quoted_string -// // ), -// // ( -// // EmacsField::Required(":CATEGORY"), -// // |w| w.category.as_ref(), -// // wasm_compare_property_quoted_string -// // ) -// // ); - -// Ok(result) -// } -// } - -// impl<'s, 'p> WasmElispCompare<'s, 'p> for WasmLineBreak<'s, 'p> { -// fn compare_ast_node<'b>( -// &self, -// source: &'s str, -// emacs: &'b Token<'s>, -// ) -> Result, Box> { -// // TODO: Implement this. -// let result = WasmDiffResult::default(); -// // let result = wasm_compare!( -// // source, -// // emacs, -// // self, -// // ( -// // EmacsField::Required(":path"), -// // |w| w.path.as_ref().and_then(|p| p.to_str()), -// // wasm_compare_property_quoted_string -// // ), -// // ( -// // EmacsField::Required(":CATEGORY"), -// // |w| w.category.as_ref(), -// // wasm_compare_property_quoted_string -// // ) -// // ); - -// Ok(result) -// } -// } - -// impl<'s, 'p> WasmElispCompare<'s, 'p> for WasmTarget<'s, 'p> { -// fn compare_ast_node<'b>( -// &self, -// source: &'s str, -// emacs: &'b Token<'s>, -// ) -> Result, Box> { -// // TODO: Implement this. -// let result = WasmDiffResult::default(); -// // let result = wasm_compare!( -// // source, -// // emacs, -// // self, -// // ( -// // EmacsField::Required(":path"), -// // |w| w.path.as_ref().and_then(|p| p.to_str()), -// // wasm_compare_property_quoted_string -// // ), -// // ( -// // EmacsField::Required(":CATEGORY"), -// // |w| w.category.as_ref(), -// // wasm_compare_property_quoted_string -// // ) -// // ); - -// Ok(result) -// } -// } - -// impl<'s, 'p> WasmElispCompare<'s, 'p> for WasmStatisticsCookie<'s, 'p> { -// fn compare_ast_node<'b>( -// &self, -// source: &'s str, -// emacs: &'b Token<'s>, -// ) -> Result, Box> { -// // TODO: Implement this. -// let result = WasmDiffResult::default(); -// // let result = wasm_compare!( -// // source, -// // emacs, -// // self, -// // ( -// // EmacsField::Required(":path"), -// // |w| w.path.as_ref().and_then(|p| p.to_str()), -// // wasm_compare_property_quoted_string -// // ), -// // ( -// // EmacsField::Required(":CATEGORY"), -// // |w| w.category.as_ref(), -// // wasm_compare_property_quoted_string -// // ) -// // ); - -// Ok(result) -// } -// } - -// impl<'s, 'p> WasmElispCompare<'s, 'p> for WasmSubscript<'s, 'p> { -// fn compare_ast_node<'b>( -// &self, -// source: &'s str, -// emacs: &'b Token<'s>, -// ) -> Result, Box> { -// // TODO: Implement this. -// let result = WasmDiffResult::default(); -// // let result = wasm_compare!( -// // source, -// // emacs, -// // self, -// // ( -// // EmacsField::Required(":path"), -// // |w| w.path.as_ref().and_then(|p| p.to_str()), -// // wasm_compare_property_quoted_string -// // ), -// // ( -// // EmacsField::Required(":CATEGORY"), -// // |w| w.category.as_ref(), -// // wasm_compare_property_quoted_string -// // ) -// // ); - -// Ok(result) -// } -// } - -// impl<'s, 'p> WasmElispCompare<'s, 'p> for WasmSuperscript<'s, 'p> { -// fn compare_ast_node<'b>( -// &self, -// source: &'s str, -// emacs: &'b Token<'s>, -// ) -> Result, Box> { -// // TODO: Implement this. -// let result = WasmDiffResult::default(); -// // let result = wasm_compare!( -// // source, -// // emacs, -// // self, -// // ( -// // EmacsField::Required(":path"), -// // |w| w.path.as_ref().and_then(|p| p.to_str()), -// // wasm_compare_property_quoted_string -// // ), -// // ( -// // EmacsField::Required(":CATEGORY"), -// // |w| w.category.as_ref(), -// // wasm_compare_property_quoted_string -// // ) -// // ); - -// Ok(result) -// } -// } - -// impl<'s, 'p> WasmElispCompare<'s, 'p> for WasmTableCell<'s, 'p> { -// fn compare_ast_node<'b>( -// &self, -// source: &'s str, -// emacs: &'b Token<'s>, -// ) -> Result, Box> { -// // TODO: Implement this. -// let result = WasmDiffResult::default(); -// // let result = wasm_compare!( -// // source, -// // emacs, -// // self, -// // ( -// // EmacsField::Required(":path"), -// // |w| w.path.as_ref().and_then(|p| p.to_str()), -// // wasm_compare_property_quoted_string -// // ), -// // ( -// // EmacsField::Required(":CATEGORY"), -// // |w| w.category.as_ref(), -// // wasm_compare_property_quoted_string -// // ) -// // ); - -// Ok(result) -// } -// } - -// impl<'s, 'p> WasmElispCompare<'s, 'p> for WasmTimestamp<'s, 'p> { -// fn compare_ast_node<'b>( -// &self, -// source: &'s str, -// emacs: &'b Token<'s>, -// ) -> Result, Box> { -// // TODO: Implement this. -// let result = WasmDiffResult::default(); -// // let result = wasm_compare!( -// // source, -// // emacs, -// // self, -// // ( -// // EmacsField::Required(":path"), -// // |w| w.path.as_ref().and_then(|p| p.to_str()), -// // wasm_compare_property_quoted_string -// // ), -// // ( -// // EmacsField::Required(":CATEGORY"), -// // |w| w.category.as_ref(), -// // wasm_compare_property_quoted_string -// // ) -// // ); - -// Ok(result) -// } -// } diff --git a/src/wasm_test/logic.rs b/src/wasm_test/logic.rs deleted file mode 100644 index a8a73dda..00000000 --- a/src/wasm_test/logic.rs +++ /dev/null @@ -1,386 +0,0 @@ -use super::diff::WasmDiffResult; -use super::diff::WasmDiffStatus; -use crate::compare::get_emacs_standard_properties; -use crate::compare::get_property; -use crate::compare::get_property_quoted_string; -use crate::compare::unquote; -use crate::compare::Token; -use crate::wasm::AdditionalProperties; -use crate::wasm::AdditionalPropertyValue; -use crate::wasm::WasmStandardProperties; - -// pub(crate) fn wasm_compare_list<'b, 's: 'b, 'p, EI, WI, WC>( -// source: &'s str, -// emacs: EI, -// wasm: WI, -// ) -> Result, Box> -// where -// EI: Iterator> + ExactSizeIterator, -// WI: Iterator + ExactSizeIterator, -// WC: WasmElispCompare<'s, 'p>, -// { -// let status = Vec::new(); -// let emacs_length = emacs.len(); -// let wasm_length = wasm.len(); -// if emacs_length != wasm_length { -// return Ok(WasmDiffResult { -// status: vec![WasmDiffStatus::Bad( -// format!( -// "Child length mismatch (emacs != rust) {:?} != {:?}", -// emacs_length, wasm_length -// ) -// .into(), -// )], -// children: Vec::new(), -// name: "".into(), -// }); -// } - -// let mut child_status = Vec::with_capacity(emacs_length); -// for (emacs_child, wasm_child) in emacs.zip(wasm) { -// child_status.push(wasm_child.compare_ast_node(source, emacs_child)?); -// } -// Ok(WasmDiffResult { -// status, -// children: child_status, -// name: "".into(), -// }) -// } - -// pub(crate) fn wasm_compare_property_quoted_string< -// 'b, -// 's, -// W, -// WV: AsRef + std::fmt::Debug, -// WG: Fn(W) -> Option, -// >( -// _source: &'s str, -// emacs: &'b Token<'s>, -// wasm_node: W, -// emacs_field: &str, -// wasm_value_getter: WG, -// ) -> Result, Box> { -// let mut result = WasmDiffResult::default(); -// let emacs_value = get_property_quoted_string(emacs, emacs_field)?; -// let wasm_value = wasm_value_getter(wasm_node); -// if wasm_value.as_ref().map(|s| s.as_ref()) != emacs_value.as_deref() { -// result.status.push(WasmDiffStatus::Bad( -// format!( -// "Property mismatch. Property=({property}) Emacs=({emacs:?}) Wasm=({wasm:?}).", -// property = emacs_field, -// emacs = emacs_value, -// wasm = wasm_value, -// ) -// .into(), -// )) -// } -// Ok(result) -// } - -// pub(crate) fn wasm_compare_property_list_of_quoted_string< -// 'b, -// 's, -// WI: Iterator + ExactSizeIterator, -// W, -// WV: AsRef + std::fmt::Debug, -// WG: Fn(W) -> Option, -// >( -// _source: &'s str, -// emacs: &'b Token<'s>, -// wasm_node: W, -// emacs_field: &str, -// wasm_value_getter: WG, -// ) -> Result, Box> { -// let mut result = WasmDiffResult::default(); -// let emacs_value = get_property(emacs, emacs_field)? -// .map(Token::as_list) -// .map_or(Ok(None), |r| r.map(Some))?; -// let wasm_value = wasm_value_getter(wasm_node); -// match (emacs_value, wasm_value) { -// (None, None) => {} -// (None, Some(_)) | (Some(_), None) => { -// return Ok(WasmDiffResult { -// status: vec![WasmDiffStatus::Bad( -// format!( -// "Property list length mismatch. Property=({property}) Emacs=({emacs:?}) Wasm=({wasm:?}).", -// property = emacs_field, -// emacs = if emacs_value.is_some() {"Some"} else {"None"}, -// wasm = if !emacs_value.is_some() {"Some"} else {"None"} -// ) -// .into(), -// )], -// children: Vec::new(), -// name: "".into(), -// }); -// } -// (Some(el), Some(wl)) if el.len() != wl.len() => { -// return Ok(WasmDiffResult { -// status: vec![WasmDiffStatus::Bad( -// format!( -// "Property list length mismatch. Property=({property}) Emacs=({emacs:?}) Wasm=({wasm:?}).", -// property = emacs_field, -// emacs = el.len(), -// wasm = wl.len() -// ) -// .into(), -// )], -// children: Vec::new(), -// name: "".into(), -// }); -// } -// (Some(el), Some(wl)) => { -// for (e, w) in el.iter().zip(wl) { -// let e = unquote(e.as_atom()?)?; -// let w = w.as_ref(); -// if e != w { -// result.status.push(WasmDiffStatus::Bad( -// format!( -// "Property list value mismatch. Property=({property}) Emacs=({emacs:?}) Wasm=({wasm:?}).", -// property = emacs_field, -// emacs = e, -// wasm = w -// ) -// .into(), -// )); -// } -// } -// } -// }; - -// Ok(result) -// } - -// pub(crate) fn wasm_compare_property_optional_pair< -// 'b, -// 's, -// W, -// WV: AsRef + std::fmt::Debug, -// WOV: AsRef + std::fmt::Debug, -// WG: Fn(W) -> Option<(Option, WV)>, -// >( -// _source: &'s str, -// emacs: &'b Token<'s>, -// wasm_node: W, -// emacs_field: &str, -// wasm_value_getter: WG, -// ) -> Result, Box> { -// let mut result = WasmDiffResult::default(); -// let emacs_value = get_property(emacs, emacs_field)? -// .map(Token::as_list) -// .map_or(Ok(None), |r| r.map(Some))?; -// let wasm_value = wasm_value_getter(wasm_node); -// match (emacs_value, &wasm_value) { -// (None, None) => {} -// (None, Some(_)) | (Some(_), None) => { -// return Ok(WasmDiffResult { -// status: vec![WasmDiffStatus::Bad( -// format!( -// "Property list length mismatch. Property=({property}) Emacs=({emacs:?}) Wasm=({wasm:?}).", -// property = emacs_field, -// emacs = if emacs_value.is_some() {"Some"} else {"None"}, -// wasm = if !emacs_value.is_some() {"Some"} else {"None"} -// ) -// .into(), -// )], -// children: Vec::new(), -// name: "".into(), -// }); -// } -// (Some(el), Some((Some(owl), wl))) if el.len() == 3 => { -// let e = el -// .first() -// .map(Token::as_atom) -// .map_or(Ok(None), |r| r.map(Some))? -// .map(unquote) -// .map_or(Ok(None), |r| r.map(Some))? -// .expect("Above match proved length to be 3."); -// let oe = el -// .get(2) -// .map(Token::as_atom) -// .map_or(Ok(None), |r| r.map(Some))? -// .map(unquote) -// .map_or(Ok(None), |r| r.map(Some))? -// .expect("Above match proved length to be 3."); -// let w = wl.as_ref(); -// let ow = owl.as_ref(); -// if e != w { -// result.status.push(WasmDiffStatus::Bad( -// format!( -// "Property mismatch. Property=({property}) Emacs=({emacs:?}) Wasm=({wasm:?}).", -// property = "end", -// emacs = e, -// wasm = w, -// ) -// .into(), -// )); -// } -// if oe != ow { -// result.status.push(WasmDiffStatus::Bad( -// format!( -// "Property mismatch. Property=({property}) Emacs=({emacs:?}) Wasm=({wasm:?}).", -// property = "end", -// emacs = oe, -// wasm = ow, -// ) -// .into(), -// )); -// } -// } -// (Some(el), Some((None, wl))) if el.len() == 1 => { -// let e = el -// .first() -// .map(Token::as_atom) -// .map_or(Ok(None), |r| r.map(Some))? -// .map(unquote) -// .map_or(Ok(None), |r| r.map(Some))? -// .expect("Above match proved length to be 3."); -// let w = wl.as_ref(); -// if e != w { -// result.status.push(WasmDiffStatus::Bad( -// format!( -// "Property mismatch. Property=({property}) Emacs=({emacs:?}) Wasm=({wasm:?}).", -// property = "end", -// emacs = e, -// wasm = w, -// ) -// .into(), -// )); -// } -// } -// (Some(el), Some(_)) => { -// return Ok(WasmDiffResult { -// status: vec![WasmDiffStatus::Bad( -// format!( -// "Property list length mismatch. Property=({property}) Emacs=({emacs:?}) Wasm=({wasm:?}).", -// property = emacs_field, -// emacs = el.len(), -// wasm = wasm_value -// ) -// .into(), -// )], -// children: Vec::new(), -// name: "".into(), -// }); -// } -// } -// Ok(result) -// } - -// pub(crate) fn wasm_compare_standard_properties<'b, 's>( -// _source: &'s str, -// emacs: &'b Token<'s>, -// wasm: &WasmStandardProperties, -// ) -> Result, Box> { -// let mut result = WasmDiffResult::default(); -// let mut layer = WasmDiffResult::default(); -// layer.name = "standard-properties".into(); -// let standard_properties = get_emacs_standard_properties(emacs)?; - -// if Some(wasm.begin) != standard_properties.begin { -// layer.status.push(WasmDiffStatus::Bad( -// format!( -// "Property mismatch. Property=({property}) Emacs=({emacs:?}) Wasm=({wasm:?}).", -// property = "begin", -// emacs = standard_properties.begin, -// wasm = Some(wasm.begin), -// ) -// .into(), -// )); -// } -// if Some(wasm.end) != standard_properties.end { -// layer.status.push(WasmDiffStatus::Bad( -// format!( -// "Property mismatch. Property=({property}) Emacs=({emacs:?}) Wasm=({wasm:?}).", -// property = "end", -// emacs = standard_properties.end, -// wasm = Some(wasm.end), -// ) -// .into(), -// )); -// } -// if wasm.contents_begin != standard_properties.contents_begin { -// layer.status.push(WasmDiffStatus::Bad( -// format!( -// "Property mismatch. Property=({property}) Emacs=({emacs:?}) Wasm=({wasm:?}).", -// property = "contents-begin", -// emacs = standard_properties.contents_begin, -// wasm = wasm.contents_begin, -// ) -// .into(), -// )); -// } -// if wasm.contents_end != standard_properties.contents_end { -// layer.status.push(WasmDiffStatus::Bad( -// format!( -// "Property mismatch. Property=({property}) Emacs=({emacs:?}) Wasm=({wasm:?}).", -// property = "contents-end", -// emacs = standard_properties.contents_end, -// wasm = wasm.contents_end, -// ) -// .into(), -// )); -// } -// if Some(wasm.post_blank).map(|post_blank| post_blank as usize) != standard_properties.post_blank -// { -// layer.status.push(WasmDiffStatus::Bad( -// format!( -// "Property mismatch. Property=({property}) Emacs=({emacs:?}) Wasm=({wasm:?}).", -// property = "post-blank", -// emacs = standard_properties.post_blank, -// wasm = Some(wasm.post_blank), -// ) -// .into(), -// )); -// } - -// result.children.push(layer); -// Ok(result) -// } - -// pub(crate) fn wasm_compare_additional_properties<'b, 's>( -// source: &'s str, -// emacs: &'b Token<'s>, -// wasm: &AdditionalProperties<'_, '_>, -// ) -> Result, Box> { -// let mut result = WasmDiffResult::default(); -// let mut layer = WasmDiffResult::default(); -// layer.name = "additional-properties".into(); - -// for (property_name, property_value) in wasm.properties.iter() { -// let emacs_property_name = format!(":{property_name}", property_name = property_name); -// match property_value { -// AdditionalPropertyValue::SingleString(wasm_value) => { -// layer.extend(wasm_compare_property_quoted_string( -// source, -// emacs, -// wasm, -// &emacs_property_name, -// |_| Some(wasm_value), -// )?)?; -// } -// AdditionalPropertyValue::ListOfStrings(wasm_value) => { -// layer.extend(wasm_compare_property_list_of_quoted_string( -// source, -// emacs, -// wasm, -// &emacs_property_name, -// |_| Some(wasm_value.iter()), -// )?)?; -// } -// // TODO: similar to compare_affiliated_keywords -// AdditionalPropertyValue::OptionalPair { optval, val } => { -// layer.extend(wasm_compare_property_optional_pair( -// source, -// emacs, -// wasm, -// &emacs_property_name, -// |_| Some((*optval, *val)), -// )?)?; -// } -// AdditionalPropertyValue::ObjectTree(_) => todo!(), -// } -// } - -// result.children.push(layer); -// Ok(result) -// } diff --git a/src/wasm_test/mod.rs b/src/wasm_test/mod.rs index a383bbc8..038b592e 100644 --- a/src/wasm_test/mod.rs +++ b/src/wasm_test/mod.rs @@ -1,6 +1,5 @@ mod compare; mod diff; -mod logic; mod macros; mod runner;