fn finish_token(&self, kind: TokenKind) -> Token<'src> {
        // This slightly convoluted code takes two slices from certain positions in the source to
        // the end of the source and figures out the distance between their starting positions by
        // subtracting their distances to the end of the source.
        let start_len = self.token_start_str.len();
        let end_len = self.chars.as_str().len();
        let len = start_len - end_len;
        let source = &self.token_start_str[..len];

        Token {
            kind,
            span: Span {
                filename: self.filename,
                start: self.token_start_pos,
                end: self.pos(),
            },
            source,
        }
    }
/// Generate a token starting at the start position from the most recent `start_token` call and
/// ending at the current position.
Generate a token starting at the start position from the most recent `start_token` call and
ending at the current position.
Generate a token starting at the start position from the most recent ` start_token ` call and ending at the current position .
fn finish_token(&self, kind: TokenKind) -> Token<'src> {
        // This slightly convoluted code takes two slices from certain positions in the source to
        // the end of the source and figures out the distance between their starting positions by
        // subtracting their distances to the end of the source.
        let start_len = self.token_start_str.len();
        let end_len = self.chars.as_str().len();
        let len = start_len - end_len;
        let source = &self.token_start_str[..len];
        Token {
            kind,
            span: Span {
                filename: self.filename,
                start: self.token_start_pos,
                end: self.pos(),
            },
            source,
        }
    }
fn finish_token ( & self , kind : TokenKind ) -> Token < ' src > { // This slightly convoluted code takes two slices from certain positions in the source to // the end of the source and figures out the distance between their starting positions by // subtracting their distances to the end of the source. let start_len = self . token_start_str . len ( ) ; let end_len = self . chars . as_str ( ) . len ( ) ; let len = start_len - end_len ; let source = & self . token_start_str [ .. len ] ; Token { kind , span : Span { filename : self . filename , start : self . token_start_pos , end : self . pos ( ) , } , source , } }
Generate a token starting at the start position from the most recent `start_token` call and
ending at the current position.
Generate a token starting at the start position from the most recent ` start_token ` call and ending at the current position .
&self
kind
TokenKind
&self
kind
TokenKind