mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
reorganization: Move hooks to common.py
This allows them to be referenced before they are filled, helping avoid circular dependencies.
This commit is contained in:
parent
34f525beaa
commit
8f9de81e24
5 changed files with 89 additions and 6 deletions
|
@ -324,7 +324,14 @@ class AnyOf(ParseNode):
|
|||
""" ParseNode that attempts to match exactly one of its children. Child
|
||||
nodes are attempted in order. """
|
||||
def __init__(self, *children):
|
||||
self.children = [to_parse_node(child) for child in children]
|
||||
self.children = children
|
||||
|
||||
@property
|
||||
def children(self):
|
||||
return self._children
|
||||
@children.setter
|
||||
def children(self, children):
|
||||
self._children = [to_parse_node(child) for child in children]
|
||||
|
||||
def _parse(self, ctx):
|
||||
for child in self.children:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue