Decrease indentation by early return
@@ -428,9 +428,11 @@ class GLRParser(Parser):
start_position, end_position,
production=production)
- if not self.dynamic_filter or \
- self._call_dynamic_filter(parent, head.state, state,
+ if self.dynamic_filter and \
+ not self._call_dynamic_filter(parent, head.state, state,
REDUCE, production, results):
+ # Action rejected by dynamic filter
+ return
parent.results = self._call_reduce_action(parent, results)
