https://docs.python.org/3/reference/expressions.html#unary-arithmetic-and-bitwise-operations
(&mut self)
| 2196 | |
| 2197 | // https://docs.python.org/3/reference/expressions.html#unary-arithmetic-and-bitwise-operations |
| 2198 | fn parse_unary_arithmetic_operation(&mut self) -> Result<Expression, ParsingError> { |
| 2199 | let node = self.start_node(); |
| 2200 | if self.cur_kind().is_unary_op() { |
| 2201 | let op = map_unary_operator(&self.cur_kind()); |
| 2202 | self.bump_any(); |
| 2203 | let operand = self.parse_unary_arithmetic_operation()?; |
| 2204 | return Ok(Expression::UnaryOp(Box::new(UnaryOperation { |
| 2205 | node: self.finish_node(node), |
| 2206 | op, |
| 2207 | operand, |
| 2208 | }))); |
| 2209 | } |
| 2210 | self.parse_power_expression() |
| 2211 | } |
| 2212 | |
| 2213 | // https://docs.python.org/3/reference/expressions.html#the-power-operator |
| 2214 | fn parse_power_expression(&mut self) -> Result<Expression, ParsingError> { |
no test coverage detected