Compare type and value.
Since we only support org-mode tables, type is always org. Value seems to always be nil, not sure why.
This commit is contained in:
		
							parent
							
								
									d4a2ad4a7f
								
							
						
					
					
						commit
						e5a402ee1b
					
				| @ -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())?); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Tom Alexander
						Tom Alexander