|
@@ -203,7 +203,16 @@ def generate_line(root):
|
|
|
else:
|
|
else:
|
|
|
content[node] = construct_nary(node)
|
|
content[node] = construct_nary(node)
|
|
|
else:
|
|
else:
|
|
|
- content[node] = construct_function(node)
|
|
|
|
|
|
|
+ result = None
|
|
|
|
|
+
|
|
|
|
|
+ if hasattr(node, 'construct_function'):
|
|
|
|
|
+ children = [content[c] for c in node]
|
|
|
|
|
+ result = node.construct_function(children)
|
|
|
|
|
+
|
|
|
|
|
+ if result == None:
|
|
|
|
|
+ result = construct_function(node)
|
|
|
|
|
+
|
|
|
|
|
+ content[node] = result
|
|
|
|
|
|
|
|
# Add negations
|
|
# Add negations
|
|
|
content[node] = '-' * node.negated + content[node]
|
|
content[node] = '-' * node.negated + content[node]
|