fn next_raw_token(&mut self) -> Option<String> {
        self.pos += self.last_len;

        let raw_token;

        //check if we prepared an extra raw_token last time around
        if let Some(ready_token) = self.ready_tokens.pop_front() {
            raw_token = ready_token;
        } else {
            raw_token = loop {
                let tmp = try_opt!(self.token_stream.next()).to_string();
                if tmp.len() > 0 {
                    break tmp;
                }
            }
        }
        self.last_len = raw_token.len() as u64 + 1; // + 1 to account for the space

        Some(raw_token.to_string())
    }
/// Separate function to encapsulate the logic of incrementing the position counter
Separate function to encapsulate the logic of incrementing the position counter
Separate function to encapsulate the logic of incrementing the position counter
fn next_raw_token(&mut self) -> Option<String> {
        self.pos += self.last_len;
        let raw_token;
        //check if we prepared an extra raw_token last time around
        if let Some(ready_token) = self.ready_tokens.pop_front() {
            raw_token = ready_token;
        } else {
            raw_token = loop {
                let tmp = try_opt!(self.token_stream.next()).to_string();
                if tmp.len() > 0 {
                    break tmp;
                }
            }
        }
        self.last_len = raw_token.len() as u64 + 1; // + 1 to account for the space
        Some(raw_token.to_string())
    }
fn next_raw_token ( & mut self ) -> Option < String > { self . pos += self . last_len ; let raw_token ; //check if we prepared an extra raw_token last time around if let Some ( ready_token ) = self . ready_tokens . pop_front ( ) { raw_token = ready_token ; } else { raw_token = loop { let tmp = try_opt ! ( self token_stream next ( ) ) . to_string ( ) ; if tmp . len ( ) > 0 { break tmp ; } } } self . last_len = raw_token . len ( ) as u64 + 1 ; // + 1 to account for the space Some ( raw_token . to_string ( ) ) }
Separate function to encapsulate the logic of incrementing the position counter
Separate function to encapsulate the logic of incrementing the position counter
&mut self