Create a new [`Lexer`] for the given source code and [`Mode`].
(source: &str, mode: Mode)
| 1669 | |
| 1670 | /// Create a new [`Lexer`] for the given source code and [`Mode`]. |
| 1671 | pub fn lex(source: &str, mode: Mode) -> Lexer { |
| 1672 | Lexer::new(source, mode, TextSize::default()) |
| 1673 | } |
| 1674 | |
| 1675 | #[cfg(test)] |
| 1676 | mod tests { |