summaryrefslogtreecommitdiff
path: root/monkey
diff options
context:
space:
mode:
authorTimotej Lazar <timotej.lazar@araneo.org>2015-04-01 16:19:02 +0200
committerAleš Smodiš <aless@guru.si>2015-08-11 14:26:03 +0200
commitb203887ecb557a02f4df7c47c2f46ee5dedb140e (patch)
tree75bf01760df8e3c217d1124c13abeb646433fb9c /monkey
parent4cffac21da85476e3656b79a8da3a019429740f1 (diff)
Use Node class from monkey.util in parser
Also simplify rules for list expressions.
Diffstat (limited to 'monkey')
-rw-r--r--monkey/graph.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/monkey/graph.py b/monkey/graph.py
index 5bf78ec..3e1d3a2 100644
--- a/monkey/graph.py
+++ b/monkey/graph.py
@@ -1,10 +1,10 @@
#!/usr/bin/python3
class Node(object):
- def __init__(self, data):
+ def __init__(self, data, eout=None):
self.data = data
self.ein = []
- self.eout = []
+ self.eout = eout if eout else []
# (Re-)insert a child node [target] to [self] at index [idx] (or as the
# rightmost child if index is not given). Also append [self] to the list of