Match and consume a function reference.
(&mut self, err_msg: &str)
| 620 | |
| 621 | // Match and consume a function reference. |
| 622 | fn match_fn(&mut self, err_msg: &str) -> ParseResult<FuncRef> { |
| 623 | if let Some(Token::FuncRef(fnref)) = self.token() { |
| 624 | self.consume(); |
| 625 | if let Some(fnref) = FuncRef::with_number(fnref) { |
| 626 | return Ok(fnref); |
| 627 | } |
| 628 | } |
| 629 | err!(self.loc, err_msg) |
| 630 | } |
| 631 | |
| 632 | // Match and consume a signature reference. |
| 633 | fn match_sig(&mut self, err_msg: &str) -> ParseResult<SigRef> { |
no test coverage detected