Create a new [`Lexer`] for the given source code and [`Mode`].
(source: &str, mode: Mode)
| 1603 | |
| 1604 | /// Create a new [`Lexer`] for the given source code and [`Mode`]. |
| 1605 | pub fn lex(source: &str, mode: Mode) -> Lexer<'_> { |
| 1606 | Lexer::new(source, mode, TextSize::default()) |
| 1607 | } |
| 1608 | |
| 1609 | #[cfg(test)] |
| 1610 | mod tests { |