Match and consume a dynamic type reference.
(&mut self, err_msg: &str)
| 593 | |
| 594 | // Match and consume a dynamic type reference. |
| 595 | fn match_dt(&mut self, err_msg: &str) -> ParseResult<DynamicType> { |
| 596 | if let Some(Token::DynamicType(dt)) = self.token() { |
| 597 | self.consume(); |
| 598 | if let Some(dt) = DynamicType::with_number(dt) { |
| 599 | return Ok(dt); |
| 600 | } |
| 601 | } |
| 602 | err!(self.loc, err_msg) |
| 603 | } |
| 604 | |
| 605 | // Extract Type from DynamicType |
| 606 | fn concrete_from_dt(&mut self, dt: DynamicType, ctx: &mut Context) -> Option<Type> { |
no test coverage detected