Add a lifetime for data in the parsed result but not from the source.
This commit is contained in:
@@ -4,10 +4,10 @@ use crate::compare::Token;
|
||||
use crate::wasm::WasmAstNode;
|
||||
use crate::wasm::WasmDocument;
|
||||
|
||||
pub fn wasm_compare_document<'b, 's>(
|
||||
pub fn wasm_compare_document<'b, 's, 'p>(
|
||||
source: &'s str,
|
||||
emacs: &'b Token<'s>,
|
||||
wasm: WasmDocument<'s>,
|
||||
wasm: WasmDocument<'s, 'p>,
|
||||
) -> Result<WasmDiffEntry<'b, 's>, Box<dyn std::error::Error>> {
|
||||
// wasm_compare_ast_node(
|
||||
todo!()
|
||||
@@ -85,10 +85,10 @@ impl<'b, 's> WasmDiffEntry<'b, 's> {
|
||||
}
|
||||
}
|
||||
|
||||
fn wasm_compare_ast_node<'b, 's>(
|
||||
fn wasm_compare_ast_node<'b, 's, 'p>(
|
||||
source: &'s str,
|
||||
emacs: &'b Token<'s>,
|
||||
wasm: WasmAstNode<'s>,
|
||||
wasm: WasmAstNode<'s, 'p>,
|
||||
) -> Result<WasmDiffEntry<'b, 's>, Box<dyn std::error::Error>> {
|
||||
match wasm {
|
||||
WasmAstNode::Document(_) => todo!(),
|
||||
@@ -153,10 +153,33 @@ fn wasm_compare_ast_node<'b, 's>(
|
||||
todo!()
|
||||
}
|
||||
|
||||
fn impl_wasm_compare_document<'b, 's>(
|
||||
// fn wasm_compare_list<'b, 's, EI, WI, WC>(
|
||||
// source: &'s str,
|
||||
// emacs: EI,
|
||||
// wasm: WI,
|
||||
// // emacs: &'b Token<'s>,
|
||||
// // wasm: WasmDocument<'s>,
|
||||
// ) -> Result<WasmDiffEntry<'b, 's>, Box<dyn std::error::Error>>
|
||||
// where
|
||||
// EI: Iterator<Item = &'b Token<'s>> + ExactSizeIterator,
|
||||
// WI: Iterator<Item = WC>,
|
||||
// WasmAstNode<'b, 's>: From<WC>,
|
||||
// {
|
||||
// let mut this_status = WasmDiffStatus::Good;
|
||||
// let mut child_status = Vec::new();
|
||||
// let mut message = None;
|
||||
|
||||
// todo!()
|
||||
// }
|
||||
|
||||
fn impl_wasm_compare_document<'b, 's, 'p>(
|
||||
source: &'s str,
|
||||
emacs: &'b Token<'s>,
|
||||
wasm: WasmDocument<'s>,
|
||||
wasm: WasmDocument<'s, 'p>,
|
||||
) -> Result<WasmDiffEntry<'b, 's>, Box<dyn std::error::Error>> {
|
||||
let mut this_status = WasmDiffStatus::Good;
|
||||
// let mut child_status = Vec::new();
|
||||
// let mut message = None;
|
||||
|
||||
todo!()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user