| 3117 | } |
| 3118 | |
| 3119 | fn parse_bin_arithmetic_op(&mut self) -> Result<BinaryOperator, ParsingError> { |
| 3120 | let op = match self.cur_kind() { |
| 3121 | Kind::Plus => Ok(BinaryOperator::Add), |
| 3122 | Kind::Minus => Ok(BinaryOperator::Sub), |
| 3123 | Kind::Mul => Ok(BinaryOperator::Mult), |
| 3124 | Kind::Div => Ok(BinaryOperator::Div), |
| 3125 | Kind::IntDiv => Ok(BinaryOperator::FloorDiv), |
| 3126 | Kind::Mod => Ok(BinaryOperator::Mod), |
| 3127 | Kind::Pow => Ok(BinaryOperator::Pow), |
| 3128 | Kind::MatrixMul => Ok(BinaryOperator::MatMult), |
| 3129 | _ => { |
| 3130 | // Err(self |
| 3131 | // .unepxted_token(self.start_node(), self.cur_kind()) |
| 3132 | // .err() |
| 3133 | // .unwrap()), |
| 3134 | panic!(); |
| 3135 | } |
| 3136 | }; |
| 3137 | self.bump_any(); |
| 3138 | op |
| 3139 | } |
| 3140 | |
| 3141 | fn parse_keyword_item(&mut self) -> Result<Keyword, ParsingError> { |
| 3142 | let node = self.start_node(); |