Introducing a trait for running compares.

This should enable us to invoke compares without needing a reference ast node type.
This commit is contained in:
Tom Alexander
2023-12-27 12:38:21 -05:00
parent 36b80dc093
commit e83417b243
3 changed files with 33 additions and 26 deletions

View File

@@ -0,0 +1,10 @@
use super::compare::WasmDiffEntry;
use crate::compare::Token;
pub trait WasmElispCompare<'s, 'p> {
fn compare_ast_node<'b>(
&'p self,
source: &'s str,
emacs: &'b Token<'s>,
) -> Result<WasmDiffEntry<'b, 's>, Box<dyn std::error::Error>>;
}