diff --git a/lark/reconstruct.py b/lark/reconstruct.py index dfdaae1..1091681 100644 --- a/lark/reconstruct.py +++ b/lark/reconstruct.py @@ -198,10 +198,9 @@ class Reconstructor: yield item def reconstruct(self, tree, postproc=None): - if postproc is None: - x = self._reconstruct(tree) - else: - x = postproc(self._reconstruct(tree)) + x = self._reconstruct(tree) + if postproc: + x = postproc(x) y = [] prev_item = '' for item in x: