Skip to content

Commit

Permalink
Merge pull request #23 from benjamij/model-bugfix
Browse files Browse the repository at this point in the history
BUGFIX: Added type check to model when accepting visitors on binary expressions (fixes #23)
  • Loading branch information
musiKk committed Jul 28, 2014
2 parents 49ba037 + 48dd713 commit eb3395d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions plyj/model.py
Expand Up @@ -459,8 +459,10 @@ def __init__(self, operator, lhs, rhs):

def accept(self, visitor):
if visitor.visit_BinaryExpression(self):
self.lhs.accept(visitor)
self.rhs.accept(visitor)
if type(self.lhs) is not str:
self.lhs.accept(visitor)
if type(self.rhs) is not str:
self.rhs.accept(visitor)


class Assignment(BinaryExpression):
Expand Down

0 comments on commit eb3395d

Please sign in to comment.