# HG changeset patch # User Emmanuel Gil Peyrot # Date 1464842722 -3600 # Node ID a0fb169fe0f921e85d9eb86f4ea438c7c05c9bab # Parent 719a27f1c1c7a1344fd5630cab06ea1433f6f6ee Add forgotten cmpop values. diff --git a/src/ast_convert.rs b/src/ast_convert.rs --- a/src/ast_convert.rs +++ b/src/ast_convert.rs @@ -83,7 +83,13 @@ fn parse_cmpop(py: Python, ast: PyObject let eq_type = ast_module.get(py, "Eq").unwrap(); let noteq_type = ast_module.get(py, "NotEq").unwrap(); let lt_type = ast_module.get(py, "Lt").unwrap(); + let lte_type = ast_module.get(py, "LtE").unwrap(); let gt_type = ast_module.get(py, "Gt").unwrap(); + let gte_type = ast_module.get(py, "GtE").unwrap(); + let is_type = ast_module.get(py, "Is").unwrap(); + let is_not_type = ast_module.get(py, "IsNot").unwrap(); + let in_type = ast_module.get(py, "In").unwrap(); + let not_in_type = ast_module.get(py, "NotIn").unwrap(); assert!(is_instance(&ast, &ast_type)); @@ -93,8 +99,20 @@ fn parse_cmpop(py: Python, ast: PyObject cmpop::NotEq } else if is_instance(&ast, <_type) { cmpop::Lt + } else if is_instance(&ast, <e_type) { + cmpop::LtE } else if is_instance(&ast, >_type) { cmpop::Gt + } else if is_instance(&ast, >e_type) { + cmpop::GtE + } else if is_instance(&ast, &is_type) { + cmpop::Is + } else if is_instance(&ast, &is_not_type) { + cmpop::IsNot + } else if is_instance(&ast, &in_type) { + cmpop::In + } else if is_instance(&ast, ¬_in_type) { + cmpop::NotIn } else { unreachable!() }