Commit d7b30961 authored by Taddeus Kroes's avatar Taddeus Kroes

Forced usage of Leaf stringification in line generator.

This allows for overwriting of the stringification method. To be able to
introduce utf-8 version of the PI-character, for example.
parent 21f0710c
......@@ -98,7 +98,7 @@ def generate_line(root):
return '<empty expression>'
if root.is_leaf:
return '-' * root.negated + root.title()
return str(root)
content = {}
......@@ -194,7 +194,7 @@ def generate_line(root):
# the leafs and nodes in depth first order.
for node in traverse_depth_first(root):
if node.is_leaf:
content[node] = node.title()
content[node] = str(node)
else:
arity = len(node)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment