Match and consume a constant reference.
(&mut self)
| 642 | |
| 643 | // Match and consume a constant reference. |
| 644 | fn match_constant(&mut self) -> ParseResult<Constant> { |
| 645 | if let Some(Token::Constant(c)) = self.token() { |
| 646 | self.consume(); |
| 647 | if let Some(c) = Constant::with_number(c) { |
| 648 | return Ok(c); |
| 649 | } |
| 650 | } |
| 651 | err!(self.loc, "expected constant number: const«n»") |
| 652 | } |
| 653 | |
| 654 | // Match and consume a stack limit token |
| 655 | fn match_stack_limit(&mut self) -> ParseResult<()> { |
no test coverage detected