(&mut self)
| 1441 | } |
| 1442 | let arguments = self.parse_argument_list_after_open_paren()?; |
| 1443 | if arguments.len() != 1 { |
| 1444 | return Err(self.error("type cast expects exactly one argument")); |
| 1445 | } |
| 1446 | expr = Expression::Cast { |
| 1447 | target_ty, |
| 1448 | expr: Box::new(arguments.into_iter().next().unwrap()), |
| 1449 | }; |
| 1450 | } else { |
| 1451 | let arguments = self.parse_argument_list_after_open_paren()?; |
| 1452 | expr = Expression::Primary(PrimaryExpr::FunctionCall { |
| 1453 | name, |
| 1454 | type_arguments, |
| 1455 | arguments, |
| 1456 | }); |
| 1457 | } |
| 1458 | continue; |
| 1459 | } |
| 1460 | |
| 1461 | break; |
| 1462 | } |
| 1463 | |
| 1464 | Ok(expr) |
| 1465 | } |
| 1466 | |
| 1467 | fn try_parse_call_type_arguments(&mut self) -> Option<Vec<Type>> { |
no test coverage detected