class GenericVisitor(object):
    def visit(self, node):
        clsname = node.__class__.__name__.lower()
        method = getattr(self, 'visit_%s' % clsname, None)

        if method:
            return method(node)
        else:
            self.generic_visit(node)

    def generic_visit(self, node):
        return vc


class EvalVisitor(GenericVisitor):
    def visit_expr(self, node):
        return self.visit_binop(node.value)

    def visit_binop(self, node):
        left, op, right = list(node)
        left = self.visit_number(left)
        op = self.visit_operator(op)
        right = self.visit_number(right)
        return eval('%s %s %s' % (left, op, right))

    def visit_operator(self, node):
        return node.value

    def visit_number(self, node):
        return float(node.value)

@@ -1,326 +1,48 @@
-class GenericVisitor(object):%0A    def visit(self, node):%0A        clsname = node.__class__.__name__.lower()%0A        method = getattr(self, 'visit_%25s' %25 clsname, None)%0A%0A        if method:%0A            return method(node)%0A        else:%0A            self.g
+from luna.ast.visitors import G
 eneric
-_v
+V
 isit
-(node)%0A%0A    def generic_visit(self, node):%0A        return vc
+or
 %0A%0A%0Ac
@@ -96,32 +96,36 @@
 _expr(self, node
+, vc
 ):%0A        retur
@@ -130,36 +130,13 @@
 urn 
-self.visit_binop(node.value)
+vc%5B0%5D
 %0A%0A  
@@ -155,32 +155,36 @@
 binop(self, node
+, vc
 ):%0A        left,
@@ -205,129 +205,10 @@
 ist(
-node)%0A        left = self.visit_number(left)%0A        op = self.visit_operator(op)%0A        right = self.visit_number(right
+vc
 )%0A  
@@ -283,32 +283,36 @@
 rator(self, node
+, vc
 ):%0A        retur
@@ -356,16 +356,20 @@
 lf, node
+, vc
 ):%0A     

simplify eval visitor