diff --git a/src/compare/diff.rs b/src/compare/diff.rs index dd44402..b27e22a 100644 --- a/src/compare/diff.rs +++ b/src/compare/diff.rs @@ -1388,7 +1388,22 @@ fn compare_table<'b, 's>( } } - // TODO: Compare :type :value + // Compare type + let table_type = get_property_unquoted_atom(emacs, ":type")?.expect("Table should have a type"); + if table_type != "org" { + this_status = DiffStatus::Bad; + message = Some(format!( + "Table type mismatch (emacs != rust) {:?} != {:?}", + table_type, "org" + )); + } + + // Compare value + let value = get_property(emacs, ":value")?; + if value.is_some() { + this_status = DiffStatus::Bad; + message = Some(format!("Non-nil value {:?}", value)) + } for (emacs_child, rust_child) in children.iter().skip(2).zip(rust.children.iter()) { child_status.push(compare_ast_node(source, emacs_child, rust_child.into())?);