(source: &str, mode: Mode)
| 1675 | |
| 1676 | #[track_caller] |
| 1677 | fn lex_invalid(source: &str, mode: Mode) -> LexerOutput { |
| 1678 | let output = lex(source, mode, TextSize::default()); |
| 1679 | |
| 1680 | assert!( |
| 1681 | !output.errors.is_empty(), |
| 1682 | "Expected lexer to generate at least one error for the following source:\n{source}" |
| 1683 | ); |
| 1684 | |
| 1685 | output |
| 1686 | } |
| 1687 | |
| 1688 | #[track_caller] |
| 1689 | fn lex_source(source: &str) -> LexerOutput { |