Skip to content

Commit

Permalink
Workaround for bug in cgen. See #32.
Browse files Browse the repository at this point in the history
  • Loading branch information
Shoaib Kamil committed Apr 24, 2012
1 parent d5ccf53 commit 5788be1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions asp/codegen/cpp_ast.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,11 @@ def __init__(self, left, op, right):
self.right = right
self._fields = ('left', 'op', 'right')

# cgen as of 4/24/2012 has a bug that directly calls split() on a Compare object.
# see https://github.com/shoaibkamil/asp/issues/32
def split(self, t):
return str(self).split(t)

def generate(self, with_semicolon=False):
yield '%s %s %s' % (self.left, self.op, self.right)

Expand Down

0 comments on commit 5788be1

Please sign in to comment.