(self, with_filter: bool = True)
| 624 | return left |
| 625 | |
| 626 | def parse_unary(self, with_filter: bool = True) -> nodes.Expr: |
| 627 | token_type = self.stream.current.type |
| 628 | lineno = self.stream.current.lineno |
| 629 | node: nodes.Expr |
| 630 | |
| 631 | if token_type == "sub": |
| 632 | next(self.stream) |
| 633 | node = nodes.Neg(self.parse_unary(False), lineno=lineno) |
| 634 | elif token_type == "add": |
| 635 | next(self.stream) |
| 636 | node = nodes.Pos(self.parse_unary(False), lineno=lineno) |
| 637 | else: |
| 638 | node = self.parse_primary() |
| 639 | node = self.parse_postfix(node) |
| 640 | if with_filter: |
| 641 | node = self.parse_filter_expr(node) |
| 642 | return node |
| 643 | |
| 644 | def parse_primary(self) -> nodes.Expr: |
| 645 | token = self.stream.current |
no test coverage detected