fix display bug for nary op
This commit is contained in:
parent
a414e57162
commit
fbd7cc0564
1 changed files with 1 additions and 1 deletions
2
ast.py
2
ast.py
|
|
@ -47,7 +47,7 @@ class NaryOpSTL(namedtuple('NaryOp', ['args'])):
|
||||||
if n == 1:
|
if n == 1:
|
||||||
return "{}".format(self.args[0])
|
return "{}".format(self.args[0])
|
||||||
elif self.args:
|
elif self.args:
|
||||||
rep = " {op} ".join(["({})"]*(len(self.args) - 1))
|
rep = " {op} ".join(["({})"]*(len(self.args)))
|
||||||
return rep.format(*self.args, op=self.OP)
|
return rep.format(*self.args, op=self.OP)
|
||||||
else:
|
else:
|
||||||
return ""
|
return ""
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue