Commit 97d7f3bc authored by eckhart's avatar eckhart

- small changes

parent 322e9669
......@@ -1256,8 +1256,7 @@ class MetaParser(Parser):
return nd2
elif self.pname:
return Node(self.tag_name, ()) # type: Node
# avoid creation of a node object for empty nodes
return EMPTY_NODE
return EMPTY_NODE # avoid creation of a node object for anonymous empty nodes
@cython.locals(N=cython.int)
......@@ -1271,8 +1270,7 @@ class MetaParser(Parser):
return self._return_value(results[0])
elif self.pname:
return Node(self.tag_name, ())
# avoid creation of a node object for empty nodes
return EMPTY_NODE
return EMPTY_NODE # avoid creation of a node object for anonymous empty nodes
class UnaryParser(MetaParser):
......
......@@ -718,7 +718,7 @@ class FrozenNode(Node):
@errors.setter
def errors(self, errors: List[Error]):
if errors != []:
if errors:
raise AssertionError('Cannot assign error list to frozen node')
def init_pos(self, pos: int) -> 'Node':
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment