MCPcopy Create free account
hub / github.com/LPC4/Full-Stack / expect_hex_integer

Method expect_hex_integer

crates/hll-to-ir/src/parser.rs:1575–1589  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

1573 if self.match_gt() {
1574 return Ok(());
1575 }
1576 if matches!(self.peek(), Some(Token::Shr | Token::Gte)) {
1577 self.advance();
1578 self.pending_gt_from_shr = true;
1579 return Ok(());
1580 }
1581 Err(self.error("expected `>` to close type arguments"))
1582 }
1583
1584 fn parse_type_atom(&mut self) -> Result<Type, ParserError> {
1585 match self.peek() {
1586 Some(Token::I8) => {
1587 self.advance();
1588 Ok(Type::Primitive("i8".into()))
1589 }
1590 Some(Token::I16) => {
1591 self.advance();
1592 Ok(Type::Primitive("i16".into()))

Callers 2

parse_primaryMethod · 0.80

Calls 5

u64_bits_to_i64Function · 0.85
peekMethod · 0.80
error_with_tokenMethod · 0.80
errorMethod · 0.45
advanceMethod · 0.45

Tested by

no test coverage detected