(self, graph, node)
| 109 | self.patterns = patterns |
| 110 | |
| 111 | def match(self, graph, node): |
| 112 | all_matches = [] |
| 113 | for i, p in enumerate(self.patterns): |
| 114 | matches, following = p.match(graph, node) |
| 115 | if not matches: |
| 116 | return [], None |
| 117 | all_matches.extend(matches) |
| 118 | if i < len(self.patterns) - 1: |
| 119 | node = following # Might be more than one node |
| 120 | return all_matches, following |
| 121 | |
| 122 | |
| 123 | class ParallelPattern(): |