From: David Kerkeslager Date: Tue, 8 Aug 2017 14:55:47 +0000 (-0400) Subject: Start playing out the normalization of other infix operations X-Git-Url: https://code.kerkeslager.com/?a=commitdiff_plain;h=91b2dba6fdc474d9477255fa887b4d0b2464f95e;p=fur Start playing out the normalization of other infix operations --- diff --git a/normalization.py b/normalization.py index e3760f6..8968aaf 100644 --- a/normalization.py +++ b/normalization.py @@ -114,14 +114,21 @@ def normalize_basic_infix_operation(counter, expression): ), ) +def normalize_comparison_expression(counter, expression): + # TODO Unfake this + return fake_normalization(counter, expression) + +def normalize_boolean_expression(counter, expression): + # TODO Unfake this + return fake_normalization(counter, expression) + def normalize_infix_expression(counter, expression): - # TODO Unfake this normalization return { 'multiplication_level': normalize_basic_infix_operation, 'addition_level': normalize_basic_infix_operation, - 'comparison_level': fake_normalization, - 'and_level': fake_normalization, - 'or_level': fake_normalization, + 'comparison_level': normalize_comparison_expression, + 'and_level': normalize_boolean_expression, + 'or_level': normalize_boolean_expression, }[expression.order](counter, expression) def normalize_expression(counter, expression):