|
|
@@ -158,11 +158,11 @@ def generate_line(root):
|
|
|
# Function call
|
|
|
result = op + '(' + ', '.join(map(traverse, node)) + ')'
|
|
|
|
|
|
- # An addition with negation can be written as a subtraction, e.g.:
|
|
|
- # 1 + -2 -> 1 - 2
|
|
|
- return result.replace('+ -', '- ')
|
|
|
+ return result
|
|
|
|
|
|
- return traverse(root)
|
|
|
+ # An addition with negation can be written as a subtraction, e.g.:
|
|
|
+ # 1 + -2 -> 1 - 2
|
|
|
+ return traverse(root).replace('+ -', '- ')
|
|
|
|
|
|
|
|
|
def is_negation(node):
|