Match and consume a signature reference.
(&mut self, err_msg: &str)
| 631 | |
| 632 | // Match and consume a signature reference. |
| 633 | fn match_sig(&mut self, err_msg: &str) -> ParseResult<SigRef> { |
| 634 | if let Some(Token::SigRef(sigref)) = self.token() { |
| 635 | self.consume(); |
| 636 | if let Some(sigref) = SigRef::with_number(sigref) { |
| 637 | return Ok(sigref); |
| 638 | } |
| 639 | } |
| 640 | err!(self.loc, err_msg) |
| 641 | } |
| 642 | |
| 643 | // Match and consume a constant reference. |
| 644 | fn match_constant(&mut self) -> ParseResult<Constant> { |
no test coverage detected