Skip to content
Snippets Groups Projects
Commit 49a93dc0 authored by Taddeüs Kroes's avatar Taddeüs Kroes
Browse files

Code cleanup.

parent 8349bc37
No related branches found
No related tags found
No related merge requests found
......@@ -236,6 +236,7 @@ def generate_line(root):
left, right = node
lstr = content[left]
rstr = content[right]
lpred = pred(left)
rpred = pred(right)
lparens = rparens = False
......@@ -255,16 +256,16 @@ def generate_line(root):
elif is_left_assoc(right.title()):
rparens = True
# Check if multiplication sign is necessary
if op == '*' and not unary_right:
sep = mult_sign(left, right, lparens, rparens)
if lparens:
lstr = '(' + lstr + ')'
if rparens:
rstr = '(' + rstr + ')'
# Check if multiplication sign is necessary
if op == '*' and not unary_right:
sep = mult_sign(left, right, lparens, rparens)
return lstr + sep + rstr
def construct_nary_mult(node):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment