Placeholder for comparing quoted strings.
This commit is contained in:
parent
579cbb5d11
commit
c2f9789a64
@ -87,6 +87,12 @@ fn compare_json_value<'b, 's>(
|
|||||||
// We hit a regular ast node.
|
// We hit a regular ast node.
|
||||||
compare_ast_node(source, el, wasm)
|
compare_ast_node(source, el, wasm)
|
||||||
}
|
}
|
||||||
|
(serde_json::Value::String(w), Token::Atom(e))
|
||||||
|
if e.starts_with('"') && e.ends_with('"') =>
|
||||||
|
{
|
||||||
|
// We hit a string compared against a quoted string from elisp (as opposed to an unquoted literal).
|
||||||
|
compare_quoted_string(source, e, w)
|
||||||
|
}
|
||||||
(serde_json::Value::Null, Token::Atom(_)) => todo!(),
|
(serde_json::Value::Null, Token::Atom(_)) => todo!(),
|
||||||
(serde_json::Value::Null, Token::List(_)) => todo!(),
|
(serde_json::Value::Null, Token::List(_)) => todo!(),
|
||||||
(serde_json::Value::Null, Token::TextWithProperties(_)) => todo!(),
|
(serde_json::Value::Null, Token::TextWithProperties(_)) => todo!(),
|
||||||
@ -235,6 +241,16 @@ fn wasm_key_to_emacs_key<WK: std::fmt::Display>(wasm_key: WK) -> String {
|
|||||||
format!(":{key}", key = wasm_key)
|
format!(":{key}", key = wasm_key)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn compare_quoted_string<'e, 's, 'w>(
|
||||||
|
source: &'s str,
|
||||||
|
emacs: &'e str,
|
||||||
|
wasm: &'w String,
|
||||||
|
) -> Result<WasmDiffResult<'s>, Box<dyn std::error::Error>> {
|
||||||
|
let mut result = WasmDiffResult::default();
|
||||||
|
// TODO
|
||||||
|
Ok(result)
|
||||||
|
}
|
||||||
|
|
||||||
// pub fn old_wasm_compare_document<'b, 's, 'p>(
|
// pub fn old_wasm_compare_document<'b, 's, 'p>(
|
||||||
// source: &'s str,
|
// source: &'s str,
|
||||||
// emacs: &'b Token<'s>,
|
// emacs: &'b Token<'s>,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user