pub fn trailing_comments_with_previous(&mut self, end: BytePos) -> CommentsIterator<'a> {
        let mut comment_vecs = Vec::new();

        loop {
            if let Some(token) = self.tokens.get(self.token_index) {
                self.append_leading(&mut comment_vecs, &token.lo());

                let is_comma = token.token == Token::Comma;
                if !is_comma && token.lo() >= end {
                    break;
                }

                let token_hi = token.hi();
                if is_comma || token_hi <= end {
                    self.append_trailing(&mut comment_vecs, &token_hi);
                    self.token_index += 1;
                } else {
                    break;
                }
            } else {
                break;
            }
        }

        // get any comments stored at the end of the file
        if self.token_index >= self.tokens.len() {
            let file_length = self.file_bytes.len() as u32;
            self.append_leading(&mut comment_vecs, &BytePos(file_length));
        }

        return CommentsIterator::new(comment_vecs);
    }
/// Gets the trailing comments and all previously unhandled comments
Gets the trailing comments and all previously unhandled comments
Gets the trailing comments and all previously unhandled comments
pub fn trailing_comments_with_previous(&mut self, end: BytePos) -> CommentsIterator<'a> {
        let mut comment_vecs = Vec::new();
        loop {
            if let Some(token) = self.tokens.get(self.token_index) {
                self.append_leading(&mut comment_vecs, &token.lo());
                let is_comma = token.token == Token::Comma;
                if !is_comma && token.lo() >= end {
                    break;
                }
                let token_hi = token.hi();
                if is_comma || token_hi <= end {
                    self.append_trailing(&mut comment_vecs, &token_hi);
                    self.token_index += 1;
                } else {
                    break;
                }
            } else {
                break;
            }
        }
        // get any comments stored at the end of the file
        if self.token_index >= self.tokens.len() {
            let file_length = self.file_bytes.len() as u32;
            self.append_leading(&mut comment_vecs, &BytePos(file_length));
        }
        return CommentsIterator::new(comment_vecs);
    }
pub fn trailing_comments_with_previous ( & mut self , end : BytePos ) -> CommentsIterator < ' a > { let mut comment_vecs = Vec :: new ( ) ; loop { if let Some ( token ) = self . tokens . get ( self . token_index ) { self . append_leading ( & mut comment_vecs , & token . lo ( ) ) ; let is_comma = token . token == Token :: Comma ; if ! is_comma && token . lo ( ) >= end { break ; } let token_hi = token . hi ( ) ; if is_comma || token_hi <= end { self . append_trailing ( & mut comment_vecs , & token_hi ) ; self . token_index += 1 ; } else { break ; } } else { break ; } } // get any comments stored at the end of the file if self . token_index >= self . tokens . len ( ) { let file_length = self . file_bytes . len ( ) as u32 ; self . append_leading ( & mut comment_vecs , & BytePos ( file_length ) ) ; } return CommentsIterator :: new ( comment_vecs ) ; }
Gets the trailing comments and all previously unhandled comments
Gets the trailing comments and all previously unhandled comments
&mut self
end
BytePos
&mut self
end
BytePos