Bugfix for propagate_positions

This commit is contained in:
Erez Shinan 2018-09-18 21:19:20 +03:00
parent 8ee9b4cfcb
commit 48a781fcf2
1 changed files with 3 additions and 2 deletions

View File

@ -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