diff --git a/zeekscript/formatter.py b/zeekscript/formatter.py index bbbea2b..8c7128e 100644 --- a/zeekscript/formatter.py +++ b/zeekscript/formatter.py @@ -149,6 +149,8 @@ def _format_child_impl(self, node, indent, hints=None): def _format_child(self, child=None, indent=False, hints=None): if child is None: child = self._next_child() + if child is None: + return # XXX Pretty subtle that we handle the child's surrounding context here, # in the parent. Might have to refactor in the future.