(self)
| 754 | return nodes.List(items, lineno=token.lineno) |
| 755 | |
| 756 | def parse_dict(self) -> nodes.Dict: |
| 757 | token = self.stream.expect("lbrace") |
| 758 | items: t.List[nodes.Pair] = [] |
| 759 | while self.stream.current.type != "rbrace": |
| 760 | if items: |
| 761 | self.stream.expect("comma") |
| 762 | if self.stream.current.type == "rbrace": |
| 763 | break |
| 764 | key = self.parse_expression() |
| 765 | self.stream.expect("colon") |
| 766 | value = self.parse_expression() |
| 767 | items.append(nodes.Pair(key, value, lineno=key.lineno)) |
| 768 | self.stream.expect("rbrace") |
| 769 | return nodes.Dict(items, lineno=token.lineno) |
| 770 | |
| 771 | def parse_postfix(self, node: nodes.Expr) -> nodes.Expr: |
| 772 | while True: |
no test coverage detected