Parses every Python expression. Matches the `expressions` rule in the [Python grammar]. The [`ExpressionContext`] can be used to match the `star_expressions` rule. [Python grammar]: https://docs.python.org/3/reference/grammar.html
(&mut self, context: ExpressionContext)
| 150 | /// |
| 151 | /// [Python grammar]: https://docs.python.org/3/reference/grammar.html |
| 152 | pub(super) fn parse_expression_list(&mut self, context: ExpressionContext) -> ParsedExpr { |
| 153 | let start = self.node_start(); |
| 154 | let parsed_expr = self.parse_conditional_expression_or_higher_impl(context); |
| 155 | |
| 156 | if self.at(TokenKind::Comma) { |
| 157 | let subsequent_context = context.disallow_yield_expressions(); |
| 158 | Expr::Tuple(self.parse_tuple_expression( |
| 159 | parsed_expr.expr, |
| 160 | start, |
| 161 | Parenthesized::No, |
| 162 | |p| p.parse_conditional_expression_or_higher_impl(subsequent_context), |
| 163 | )) |
| 164 | .into() |
| 165 | } else { |
| 166 | parsed_expr |
| 167 | } |
| 168 | } |
| 169 | |
| 170 | /// Parses every Python expression except unparenthesized tuple. |
| 171 | /// |
no test coverage detected