Skip to content

Commit

Permalink
Update parse_tree_builder.py
Browse files Browse the repository at this point in the history
  • Loading branch information
jmishra01 authored Jul 3, 2023
1 parent bd06d86 commit 28af26b
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions lark/parse_tree_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ def make_propagate_positions(option):
return PropagatePositions
elif option is False:
return None

raise ConfigurationError('Invalid option for propagate_positions: %r' % option)


Expand All @@ -95,15 +94,13 @@ def __init__(self, to_include, append_none, node_builder):

def __call__(self, children):
filtered = []

for i, to_expand, add_none in self.to_include:
if add_none:
filtered += [None] * add_none
if to_expand:
filtered += children[i].children
else:
filtered.append(children[i])

if self.append_none:
filtered += [None] * self.append_none

Expand Down

0 comments on commit 28af26b

Please sign in to comment.