fn hex_num(&mut self) {
        // \u strings must have the form \u HEX HEX HEX HEX meaning we can loop over 0..3
        for _ in 0..3 {
            match self.current_char {
                // Check if the character is a digit in base 16
                Some(c) if !c.is_digit(16) => {
                    panic!("Invalid hex value")
                },
                None => panic!("Unexpected end of string"),
                _ => { self.advance() }
            }
        }
    }
// Handle hex number for \u strings
Handle hex number for \u strings
Handle hex number for \ u strings
fn hex_num(&mut self) {
        // \u strings must have the form \u HEX HEX HEX HEX meaning we can loop over 0..3
        for _ in 0..3 {
            match self.current_char {
                // Check if the character is a digit in base 16
                Some(c) if !c.is_digit(16) => {
                    panic!("Invalid hex value")
                },
                None => panic!("Unexpected end of string"),
                _ => { self.advance() }
            }
        }
    }
fn hex_num ( & mut self ) { // \u strings must have the form \u HEX HEX HEX HEX meaning we can loop over 0..3 for _ in 0 .. 3 { match self . current_char { // Check if the character is a digit in base 16 Some ( c ) if ! c . is_digit ( 16 ) => { panic ! ( " " ) } , None => panic ! ( " " ) , _ => { self . advance ( ) } } } }
Handle hex number for \u strings
Handle hex number for \ u strings
&mut self
&mut self