fn skip_to_next_line(&mut self) {
        loop {
            let token = self.take();
            match token.token {
                Token::Eof => {
                    self.push_back(token);
                    return;
                }
                Token::NewLine => break,
                _ => (),
            }
        }
        let token = self.take();
        if token.token != Token::Indent {
            self.push_back(token);
            return;
        }
        let mut level = 1;
        loop {
            let token = self.take();
            match token.token {
                Token::Eof => {
                    self.push_back(token);
                    return;
                }
                Token::Dedent => {
                    level -= 1;
                    if level == 0 {
                        return;
                    }
                }
                Token::Indent => {
                    level += 1;
                }
                _ => (),
            }
        }
    }
// For error recovery. Skip pass the next NEWLINE token,
// and skip the following INDEND..DEDENT block if any.
For error recovery. Skip pass the next NEWLINE token,
and skip the following INDEND..DEDENT block if any.
For error recovery . Skip pass the next NEWLINE token and skip the following INDEND .. DEDENT block if any .
fn skip_to_next_line(&mut self) {
        loop {
            let token = self.take();
            match token.token {
                Token::Eof => {
                    self.push_back(token);
                    return;
                }
                Token::NewLine => break,
                _ => (),
            }
        }
        let token = self.take();
        if token.token != Token::Indent {
            self.push_back(token);
            return;
        }
        let mut level = 1;
        loop {
            let token = self.take();
            match token.token {
                Token::Eof => {
                    self.push_back(token);
                    return;
                }
                Token::Dedent => {
                    level -= 1;
                    if level == 0 {
                        return;
                    }
                }
                Token::Indent => {
                    level += 1;
                }
                _ => (),
            }
        }
    }
fn skip_to_next_line ( & mut self ) { loop { let token = self . take ( ) ; match token . token { Token :: Eof => { self . push_back ( token ) ; return ; } Token :: NewLine => break , _ => ( ) , } } let token = self . take ( ) ; if token . token != Token :: Indent { self . push_back ( token ) ; return ; } let mut level = 1 ; loop { let token = self . take ( ) ; match token . token { Token :: Eof => { self . push_back ( token ) ; return ; } Token :: Dedent => { level -= 1 ; if level == 0 { return ; } } Token :: Indent => { level += 1 ; } _ => ( ) , } } }
For error recovery.
For error recovery .
&mut self