Skip to main content

tokenize_with_comments

Function tokenize_with_comments 

Source
pub fn tokenize_with_comments(
    source: &str,
) -> Result<Vec<Spanned<Token>>, Vec<Spanned<LexerError>>>
Expand description

Tokenize, preserving Comment and LineContinuation tokens.

Runs the SAME pipeline as tokenize (pre-#95 this was a divergent second pipeline with no preprocessing or merges). Useful for pretty-printing and formatting tools.