/// Consume an integer literal that uses a specific radix.
Consume an integer literal that uses a specific radix.
Consume an integer literal that uses a specific radix .
fn consume_radix_literal(
        &mut self,
        radix_name: &str,
        is_digit: impl Fn(char) -> bool,
    ) -> TokenKind {
        if self.skip_separated_digits(is_digit) == 0 {
            self.add_diagnostic(
                Diagnostic::new_error(format!("no valid digits found in {} literal", radix_name))
                    .with_label(Label::new_primary(self.token_span())),
            );
            TokenKind::Error
        } else {
            TokenKind::IntLiteral
        }
    }
fn consume_radix_literal ( & mut self , radix_name : & str , is_digit : impl Fn ( char ) -> bool , ) -> TokenKind { if self . skip_separated_digits ( is_digit ) == 0 { self . add_diagnostic ( Diagnostic :: new_error ( format ! ( " " radix_name ) ) . with_label ( Label :: new_primary ( self . token_span ( ) ) ) , ) ; TokenKind :: Error } else { TokenKind :: IntLiteral } }
Consume an integer literal that uses a specific radix.
Consume an integer literal that uses a specific radix .
&mut self
radix_name
&str
is_digit
impl Fn(char) -> bool