Exemplo n.º 1
0
 def _token_led_filter(self, left):
     # Filters are projections.
     condition = self._expression(0)
     self._match('rbracket')
     if self._current_token() == 'flatten':
         right = ast.identity()
     else:
         right = self._parse_projection_rhs(self.BINDING_POWER['filter'])
     return ast.filter_projection(left, right, condition)
Exemplo n.º 2
0
 def _token_led_filter(self, left):
     # Filters are projections.
     condition = self._expression(0)
     self._match('rbracket')
     if self._current_token() == 'flatten':
         right = ast.identity()
     else:
         right = self._parse_projection_rhs(self.BINDING_POWER['filter'])
     return ast.filter_projection(left, right, condition)