pub fn new(
        source: &Source,
        lexer: L,
        diagnostics: &mut Diagnostics,
    ) -> Self {
        let mut this = Self {
            reader: source.reader(),
            lexer,
            tokens: Vec::new(),
            position: 0,
        };
        let tok_res = this.lexer.generate_token(&mut this.reader, diagnostics);
        this.tokens.push(tok_res);
        this
    }
/// Creates a token stream from source code, custom lexer, and diagnostics
/// collection where errors will be placed.
Creates a token stream from source code, custom lexer, and diagnostics
collection where errors will be placed.
Creates a token stream from source code custom lexer and diagnostics collection where errors will be placed .
pub fn new(
        source: &Source,
        lexer: L,
        diagnostics: &mut Diagnostics,
    ) -> Self {
        let mut this = Self {
            reader: source.reader(),
            lexer,
            tokens: Vec::new(),
            position: 0,
        };
        let tok_res = this.lexer.generate_token(&mut this.reader, diagnostics);
        this.tokens.push(tok_res);
        this
    }
pub fn new ( source : & Source , lexer : L , diagnostics : & mut Diagnostics , ) -> Self { let mut this = Self { reader : source . reader ( ) , lexer , tokens : Vec :: new ( ) , position : 0 , } ; let tok_res = this . lexer . generate_token ( & mut this . reader , diagnostics ) ; this . tokens . push ( tok_res ) ; this }
Creates a token stream from source code, custom lexer, and diagnostics
collection where errors will be placed.
Creates a token stream from source code custom lexer and diagnostics collection where errors will be placed .
source
&Source
lexer
L
diagnostics
&mut Diagnostics
source
&Source
lexer
L
diagnostics
&mut Diagnostics