(&mut self)
| 1103 | } |
| 1104 | |
| 1105 | fn parse_assignment_or_expression_statement(&mut self) -> Result<Statement, ParsingError> { |
| 1106 | let node = self.start_node(); |
| 1107 | let lhs = self.parse_expressions()?; |
| 1108 | |
| 1109 | if self.cur_kind() == Kind::Assign { |
| 1110 | self.parse_assignment_statement(node, lhs) |
| 1111 | } else if let Some(op) = self.parse_aug_assign_op() { |
| 1112 | self.parse_aug_assignment_statement(node, lhs, op) |
| 1113 | } else if self.at(Kind::Colon) { |
| 1114 | self.parse_ann_assign_statement(node, lhs) |
| 1115 | } else { |
| 1116 | Ok(Statement::ExpressionStatement(Box::new(lhs))) |
| 1117 | } |
| 1118 | } |
| 1119 | |
| 1120 | // https://docs.python.org/3/reference/compound_stmts.html#grammar-token-python-grammar-suite |
| 1121 | fn parse_suite(&mut self) -> Result<Vec<Statement>, ParsingError> { |
no test coverage detected