Commit 2053e80d authored by Maxime Perrotin's avatar Maxime Perrotin

In progress: refactor range computation

parent c8f72edb
......@@ -35,6 +35,7 @@
"""
import logging
import operator
from collections import defaultdict
LOG = logging.getLogger(__name__)
......@@ -67,14 +68,17 @@ class Expression(object):
class ExprPlus(Expression):
operand = '+'
op = operator.add
class ExprMul(Expression):
operand = '*'
op = operator.mul
class ExprMinus(Expression):
operand = '-'
op = operator.sub
class ExprOr(Expression):
......@@ -120,14 +124,17 @@ class ExprLe(Expression):
class ExprDiv(Expression):
operand = '/'
op = operator.div
class ExprMod(Expression):
operand = 'mod'
op = operator.mod
class ExprRem(Expression):
operand = 'rem'
op = operator.mod
class ExprNot(Expression):
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment