Remove some underscores from wasm schema to match elisp.
This commit is contained in:
@@ -87,7 +87,7 @@ fn compare_json_value<'b, 's>(
|
||||
emacs: &'b Token<'s>,
|
||||
) -> Result<WasmDiffResult<'s>, Box<dyn std::error::Error>> {
|
||||
match (value, emacs) {
|
||||
(serde_json::Value::Object(wasm), Token::List(el)) if wasm.contains_key("ast_node") => {
|
||||
(serde_json::Value::Object(wasm), Token::List(el)) if wasm.contains_key("ast-node") => {
|
||||
// We hit a regular ast node.
|
||||
compare_ast_node(source, el, wasm)
|
||||
}
|
||||
@@ -139,7 +139,7 @@ fn compare_ast_node<'b, 's, 'p>(
|
||||
.ok_or("Should have a name as the first child.")?
|
||||
.as_atom()?;
|
||||
let wasm_name = wasm
|
||||
.get("ast_node")
|
||||
.get("ast-node")
|
||||
.ok_or("Should have a ast node type.")?
|
||||
.as_str()
|
||||
.ok_or("Ast node type should be a string.")?;
|
||||
@@ -248,9 +248,9 @@ fn compare_ast_node<'b, 's, 'p>(
|
||||
for (emacs_value, wasm_name) in [
|
||||
(emacs_standard_properties.begin, "begin"),
|
||||
(emacs_standard_properties.end, "end"),
|
||||
(emacs_standard_properties.contents_begin, "contents_begin"),
|
||||
(emacs_standard_properties.contents_end, "contents_end"),
|
||||
(emacs_standard_properties.post_blank, "post_blank"),
|
||||
(emacs_standard_properties.contents_begin, "contents-begin"),
|
||||
(emacs_standard_properties.contents_end, "contents-end"),
|
||||
(emacs_standard_properties.post_blank, "post-blank"),
|
||||
] {
|
||||
match (emacs_value, wasm_standard_properties.get(wasm_name)) {
|
||||
(None, None) => {}
|
||||
|
||||
Reference in New Issue
Block a user