fn skip_unicode_char_code(&mut self) -> Result<(), Diagnostic<FileSpan>> {
        if self.expect_advance()? != '{' {
            return Err(Diagnostic::new_error("invalid unicode character code")
                .with_label(Label::new_primary(self.token_span())));
        }

        let mut digits = 0;
        loop {
            match self.expect_advance()? {
                '}' => break,
                '_' => continue,
                ch if is_hex_digit(ch) => {
                    digits += 1;
                    continue;
                },
                _ => {
                    return Err(Diagnostic::new_error("invalid unicode character code")
                        .with_label(Label::new_primary(self.token_span())))
                },
            }
        }

        match digits {
            1..=6 => Ok(()),
            _ => Err(Diagnostic::new_error("expected 1 to 6 hexadecimal digits")
                .with_label(Label::new_primary(self.token_span()))),
        }
    }
/// Skip a unicode character code.
Skip a unicode character code.
Skip a unicode character code .
fn skip_unicode_char_code(&mut self) -> Result<(), Diagnostic<FileSpan>> {
        if self.expect_advance()? != '{' {
            return Err(Diagnostic::new_error("invalid unicode character code")
                .with_label(Label::new_primary(self.token_span())));
        }
        let mut digits = 0;
        loop {
            match self.expect_advance()? {
                '}' => break,
                '_' => continue,
                ch if is_hex_digit(ch) => {
                    digits += 1;
                    continue;
                },
                _ => {
                    return Err(Diagnostic::new_error("invalid unicode character code")
                        .with_label(Label::new_primary(self.token_span())))
                },
            }
        }
        match digits {
            1..=6 => Ok(()),
            _ => Err(Diagnostic::new_error("expected 1 to 6 hexadecimal digits")
                .with_label(Label::new_primary(self.token_span()))),
        }
    }
fn skip_unicode_char_code ( & mut self ) -> Result < ( ) , Diagnostic < FileSpan > > { if self . expect_advance ( ) ? != '{' { return Err ( Diagnostic :: new_error ( " " ) . with_label ( Label :: new_primary ( self . token_span ( ) ) ) ) ; } let mut digits = 0 ; loop { match self . expect_advance ( ) ? { '}' => break , '_' => continue , ch if is_hex_digit ( ch ) => { digits += 1 ; continue ; } , _ => { return Err ( Diagnostic :: new_error ( " " ) . with_label ( Label :: new_primary ( self . token_span ( ) ) ) ) } , } } match digits { 1 ..= 6 => Ok ( ( ) ) , _ => Err ( Diagnostic :: new_error ( " " ) . with_label ( Label :: new_primary ( self . token_span ( ) ) ) ) , } }
Skip a unicode character code.
Skip a unicode character code .
&mut self
&mut self