Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/util/codegen.py
diff options
context:
space:
mode:
authorWalter Bender <walter@sugarlabs.org>2013-12-17 00:46:18 (GMT)
committer Walter Bender <walter@sugarlabs.org>2013-12-17 00:46:18 (GMT)
commit34ac9dc442c6f0aa1a1862bf4aea94feba7350f6 (patch)
tree0005d760a8bd097edc900c4da97415758d99eab2 /util/codegen.py
parent8fcb80b6bc42a1c3bbad8b5c19942c93ae6a1e12 (diff)
add ()s around bin ops
Diffstat (limited to 'util/codegen.py')
-rw-r--r--util/codegen.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/util/codegen.py b/util/codegen.py
index 46184e7..195a70a 100644
--- a/util/codegen.py
+++ b/util/codegen.py
@@ -447,9 +447,11 @@ class SourceGenerator(NodeVisitor):
self.write('}')
def visit_BinOp(self, node):
+ self.write('(')
self.visit(node.left)
self.write(' %s ' % self.BINOP_SYMBOLS[node.op])
self.visit(node.right)
+ self.write(')')
def visit_BoolOp(self, node):
self.write('(')