fn scan_block_comment(&mut self) -> Option<TokenAndSpan> {
        // block comments starting with "/**" or "/*!" are doc-comments
        let is_doc_comment = self.curr_is('*') || self.curr_is('!');
        let start_bpos = self.last_pos - BytePos(2);

        let mut level: isize = 1;
        let mut has_cr = false;
        while level > 0 {
            if self.is_eof() {
                let msg = if is_doc_comment {
                    "unterminated block doc-comment"
                } else {
                    "unterminated block comment"
                };
                let last_bpos = self.last_pos;
                self.fatal_span_(start_bpos, last_bpos, msg);
            }
            let n = self.curr.unwrap();
            match n {
                '/' if self.nextch_is('*') => {
                    level += 1;
                    self.bump();
                }
                '*' if self.nextch_is('/') => {
                    level -= 1;
                    self.bump();
                }
                '\r' => {
                    has_cr = true;
                }
                _ => ()
            }
            self.bump();
        }

        self.with_str_from(start_bpos, |string| {
            // but comments with only "*"s between two "/"s are not
            let tok = if is_block_doc_comment(string) {
                let string = if has_cr {
                    self.translate_crlf(start_bpos, string,
                                        "bare CR not allowed in block doc-comment")
                } else { string.into() };
                token::DocComment(token::intern(&string[..]))
            } else {
                token::Comment
            };

            Some(TokenAndSpan{
                tok: tok,
                sp: codemap::mk_sp(start_bpos, self.last_pos)
            })
        })
    }
/// Might return a sugared-doc-attr
Might return a sugared-doc-attr
Might return a sugared - doc - attr
fn scan_block_comment(&mut self) -> Option<TokenAndSpan> {
        // block comments starting with "/**" or "/*!" are doc-comments
        let is_doc_comment = self.curr_is('*') || self.curr_is('!');
        let start_bpos = self.last_pos - BytePos(2);
        let mut level: isize = 1;
        let mut has_cr = false;
        while level > 0 {
            if self.is_eof() {
                let msg = if is_doc_comment {
                    "unterminated block doc-comment"
                } else {
                    "unterminated block comment"
                };
                let last_bpos = self.last_pos;
                self.fatal_span_(start_bpos, last_bpos, msg);
            }
            let n = self.curr.unwrap();
            match n {
                '/' if self.nextch_is('*') => {
                    level += 1;
                    self.bump();
                }
                '*' if self.nextch_is('/') => {
                    level -= 1;
                    self.bump();
                }
                '\r' => {
                    has_cr = true;
                }
                _ => ()
            }
            self.bump();
        }
        self.with_str_from(start_bpos, |string| {
            // but comments with only "*"s between two "/"s are not
            let tok = if is_block_doc_comment(string) {
                let string = if has_cr {
                    self.translate_crlf(start_bpos, string,
                                        "bare CR not allowed in block doc-comment")
                } else { string.into() };
                token::DocComment(token::intern(&string[..]))
            } else {
                token::Comment
            };
            Some(TokenAndSpan{
                tok: tok,
                sp: codemap::mk_sp(start_bpos, self.last_pos)
            })
        })
    }
fn scan_block_comment ( & mut self ) -> Option < TokenAndSpan > { // block comments starting with "/**" or "/*!" are doc-comments let is_doc_comment = self . curr_is ( '*' ) || self . curr_is ( '!' ) ; let start_bpos = self . last_pos - BytePos ( 2 ) ; let mut level : isize = 1 ; let mut has_cr = false ; while level > 0 { if self . is_eof ( ) { let msg = if is_doc_comment { " " } else { " " } ; let last_bpos = self . last_pos ; self . fatal_span_ ( start_bpos , last_bpos , msg ) ; } let n = self . curr . unwrap ( ) ; match n { '/' if self . nextch_is ( '*' ) => { level += 1 ; self . bump ( ) ; } '*' if self . nextch_is ( '/' ) => { level -= 1 ; self . bump ( ) ; } '\r' => { has_cr = true ; } _ => ( ) } self . bump ( ) ; } self . with_str_from ( start_bpos , | string | { // but comments with only "*"s between two "/"s are not let tok = if is_block_doc_comment ( string ) { let string = if has_cr { self . translate_crlf ( start_bpos , string , " " ) } else { string . into ( ) } ; token :: DocComment ( token :: intern ( & string [ .. ] ) ) } else { token :: Comment } ; Some ( TokenAndSpan { tok : tok , sp : codemap :: mk_sp ( start_bpos , self . last_pos ) } ) } ) }
Might return a sugared-doc-attr
Might return a sugared - doc - attr
&mut self