diff options
author | Timotej Lazar <timotej.lazar@araneo.org> | 2015-04-01 16:19:02 +0200 |
---|---|---|
committer | Aleš Smodiš <aless@guru.si> | 2015-08-11 14:26:03 +0200 |
commit | b203887ecb557a02f4df7c47c2f46ee5dedb140e (patch) | |
tree | 75bf01760df8e3c217d1124c13abeb646433fb9c /monkey | |
parent | 4cffac21da85476e3656b79a8da3a019429740f1 (diff) |
Use Node class from monkey.util in parser
Also simplify rules for list expressions.
Diffstat (limited to 'monkey')
-rw-r--r-- | monkey/graph.py | 4 |
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 |