Skip to content

Commit

Permalink
[fix] make sure that we don't accidentially add the finalizing ; twice
Browse files Browse the repository at this point in the history
  • Loading branch information
chr-engwer committed Jul 1, 2016
1 parent a5dc72a commit 909e9ea
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions coffee/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -627,8 +627,8 @@ def gencode(self, not_scope=False):
if self.pragma:
prefix = "\n".join(p for p in self.pragma) + "\n"
return prefix + \
assign(self.children[0].gencode(),
self.children[1].gencode()) + \
assign(self.children[0].gencode(True),
self.children[1].gencode(True)) + \
semicolon(not_scope)


Expand All @@ -654,7 +654,7 @@ def gencode(self, not_scope=False):
prefix = ""
if self.pragma:
prefix = "\n".join(p for p in self.pragma) + "\n"
return "%s%s %s %s%s" % (prefix, sym.gencode(), type(self).op, exp.gencode(), semicolon(not_scope))
return "%s%s %s %s%s" % (prefix, sym.gencode(True), type(self).op, exp.gencode(True), semicolon(not_scope))


class Incr(AugmentedAssign):
Expand Down Expand Up @@ -794,8 +794,8 @@ def gencode(self, not_scope=False):
return prefix + decl(spacer(self.qual), self.typ + pointers, self.sym.gencode(),
spacer(self.attr)) + semicolon(not_scope)
else:
return prefix + decl_init(spacer(self.qual), self.typ + pointers, self.sym.gencode(),
spacer(self.attr), self.init.gencode(parent=self)) + \
return prefix + decl_init(spacer(self.qual), self.typ + pointers, self.sym.gencode(True),
spacer(self.attr), self.init.gencode(True, parent=self)) + \
semicolon(not_scope)


Expand Down

0 comments on commit 909e9ea

Please sign in to comment.