fn read_hex_number<Chars: Iterator<Item=char>>(buffer: &mut TokenReadBuffer<Chars>, location: FileLocation) -> (Token, String, FileLocation) {
    loop {
        let next_char = buffer.read_next();

        match next_char {
            Some(chr)       => {
                if (chr >= '0' && chr <= '9') || (chr >= 'a' && chr <= 'f') || (chr >= 'A' && chr <= 'F') {

                } else {
                    buffer.push_back();
                    break;
                }
            }
            None            => break,
        }
    }

    read_number_suffix(Token::HexNumber, Token::HexNumber, buffer, location)
}
///
/// After reading a '$', reads the rest of the hex number
///
After reading a '$', reads the rest of the hex number
After reading a ' $ ' reads the rest of the hex number
fn read_hex_number<Chars: Iterator<Item=char>>(buffer: &mut TokenReadBuffer<Chars>, location: FileLocation) -> (Token, String, FileLocation) {
    loop {
        let next_char = buffer.read_next();
        match next_char {
            Some(chr)       => {
                if (chr >= '0' && chr <= '9') || (chr >= 'a' && chr <= 'f') || (chr >= 'A' && chr <= 'F') {
                } else {
                    buffer.push_back();
                    break;
                }
            }
            None            => break,
        }
    }
    read_number_suffix(Token::HexNumber, Token::HexNumber, buffer, location)
}
fn read_hex_number < Chars : Iterator < Item = char > > ( buffer : & mut TokenReadBuffer < Chars > , location : FileLocation ) -> ( Token , String , FileLocation ) { loop { let next_char = buffer . read_next ( ) ; match next_char { Some ( chr ) => { if ( chr >= '0' && chr <= '9' ) || ( chr >= 'a' && chr <= 'f' ) || ( chr >= 'A' && chr <= 'F' ) { } else { buffer . push_back ( ) ; break ; } } None => break , } } read_number_suffix ( Token :: HexNumber , Token :: HexNumber , buffer , location ) }
After reading a '$', reads the rest of the hex number
After reading a ' $ ' reads the rest of the hex number
buffer
&mut TokenReadBuffer<Chars>
location
FileLocation
buffer
&mut TokenReadBuffer<Chars>
location
FileLocation