fn skip_whitespace_and_comments(&mut self) -> bool {
        let mut contains_newline = false;

        while let Some(c) = self.current_char {
            if c == '\n' {
                contains_newline = true;
            }

            // Are we at the start of a general comment (`/* ... */`)?
            if c == '/' && self.next_char() == Some('*') {
                // Skip the '/*'.
                self.bump();
                self.bump();

                // Skip the comment body.
                while let Some(c) = self.current_char {
                    if c == '*' && self.next_char() == Some('/') {
                        break;
                    } else {
                        self.bump();
                    }
                }

                // Skip the '*/'.
                self.bump();
                self.bump();

                // Resume whitespace skipping.
                continue;

            } else if c == '/' && self.next_char() == Some('/') {
                while let Some(c) = self.current_char {
                    if c == '\n' {
                        break;
                    } else {
                        self.bump();
                    }
                }

                // Resume whitespace skipping.
                // Since we have not bumped past the newline character,
                // the next iteration of the loop will catch it.
                continue;
            }

            if c.is_whitespace() {
                self.bump();
            } else {
                break;
            }
        }


        contains_newline
    }
/// Skip whitespace and comments, returning whether at least one newline was encountered.
Skip whitespace and comments, returning whether at least one newline was encountered.
Skip whitespace and comments returning whether at least one newline was encountered .
fn skip_whitespace_and_comments(&mut self) -> bool {
        let mut contains_newline = false;
        while let Some(c) = self.current_char {
            if c == '\n' {
                contains_newline = true;
            }
            // Are we at the start of a general comment (`/* ... */`)?
            if c == '/' && self.next_char() == Some('*') {
                // Skip the '/*'.
                self.bump();
                self.bump();
                // Skip the comment body.
                while let Some(c) = self.current_char {
                    if c == '*' && self.next_char() == Some('/') {
                        break;
                    } else {
                        self.bump();
                    }
                }
                // Skip the '*/'.
                self.bump();
                self.bump();
                // Resume whitespace skipping.
                continue;
            } else if c == '/' && self.next_char() == Some('/') {
                while let Some(c) = self.current_char {
                    if c == '\n' {
                        break;
                    } else {
                        self.bump();
                    }
                }
                // Resume whitespace skipping.
                // Since we have not bumped past the newline character,
                // the next iteration of the loop will catch it.
                continue;
            }
            if c.is_whitespace() {
                self.bump();
            } else {
                break;
            }
        }
        contains_newline
    }
fn skip_whitespace_and_comments ( & mut self ) -> bool { let mut contains_newline = false ; while let Some ( c ) = self . current_char { if c == '\n' { contains_newline = true ; } // Are we at the start of a general comment (`/* ... */`)? if c == '/' && self . next_char ( ) == Some ( '*' ) { // Skip the '/*'. self . bump ( ) ; self . bump ( ) ; // Skip the comment body. while let Some ( c ) = self . current_char { if c == '*' && self . next_char ( ) == Some ( '/' ) { break ; } else { self . bump ( ) ; } } // Skip the '*/'. self . bump ( ) ; self . bump ( ) ; // Resume whitespace skipping. continue ; } else if c == '/' && self . next_char ( ) == Some ( '/' ) { while let Some ( c ) = self . current_char { if c == '\n' { break ; } else { self . bump ( ) ; } } // Resume whitespace skipping. // Since we have not bumped past the newline character, // the next iteration of the loop will catch it. continue ; } if c . is_whitespace ( ) { self . bump ( ) ; } else { break ; } } contains_newline }
Skip whitespace and comments, returning whether at least one newline was encountered.
Skip whitespace and comments returning whether at least one newline was encountered .
&mut self