Enable basic support for evaluating float types

This commit is contained in:
Bartłomiej Pluta
2019-07-25 13:37:31 +02:00
parent 6dc503ba86
commit b126f83824
8 changed files with 64 additions and 20 deletions

View File

@@ -29,7 +29,7 @@ class RelationEvaluator(Evaluator):
@classmethod
def otherRelationOperatorsEvaluator(cls, left, operator, right):
if left.type == right.type == Type.INTEGER:
if left.type in [Type.INTEGER, Type.FLOAT] and right.type in [Type.INTEGER, Type.FLOAT]:
if operator.value == ">":
return Type.bool(left.value > right.value)