mirror of https://github.com/lark-parser/lark.git
Bugfix for propagate_positions
This commit is contained in:
parent
8ee9b4cfcb
commit
48a781fcf2
|
@ -26,9 +26,10 @@ class PropagatePositions:
|
|||
|
||||
def __call__(self, children):
|
||||
res = self.node_builder(children)
|
||||
res.meta.empty = True
|
||||
|
||||
if children and isinstance(res, Tree):
|
||||
if isinstance(res, Tree):
|
||||
res.meta.empty = True
|
||||
|
||||
for c in children:
|
||||
if isinstance(c, Tree) and c.children and not c.meta.empty:
|
||||
res.meta.line = c.meta.line
|
||||
|
|
Loading…
Reference in New Issue