/// Takes as argument the source code to HTML-ify, the rust edition to use and the source code
/// file span which will be used later on by the `span_correspondance_map`.
Takes as argument the source code to HTML-ify, the rust edition to use and the source code
file span which will be used later on by the `span_correspondance_map`.
Takes as argument the source code to HTML - ify the rust edition to use and the source code file span which will be used later on by the ` span_correspondance_map ` .
fn new(
        src: &str,
        edition: Edition,
        file_span: Span,
        decoration_info: Option<DecorationInfo>,
    ) -> Classifier<'_> {
        let tokens = PeekIter::new(TokenIter { src });
        let decorations = decoration_info.map(Decorations::new);
        Classifier {
            tokens,
            in_attribute: false,
            in_macro: false,
            in_macro_nonterminal: false,
            edition,
            byte_pos: 0,
            file_span,
            src,
            decorations,
        }
    }
fn new ( src : & str , edition : Edition , file_span : Span , decoration_info : Option < DecorationInfo > , ) -> Classifier < ' _ > { let tokens = PeekIter :: new ( TokenIter { src } ) ; let decorations = decoration_info . map ( Decorations :: new ) ; Classifier { tokens , in_attribute : false , in_macro : false , in_macro_nonterminal : false , edition , byte_pos : 0 , file_span , src , decorations , } }
Takes as argument the source code to HTML-ify, the rust edition to use and the source code
file span which will be used later on by the `span_correspondance_map`.
Takes as argument the source code to HTML - ify the rust edition to use and the source code file span which will be used later on by the ` span_correspondance_map ` .
src
&str
edition
Edition
file_span
Span
decoration_info
Option<DecorationInfo>