(source: &str)
| 2730 | } |
| 2731 | |
| 2732 | fn lex_fstring_error(source: &str) -> InterpolatedStringErrorType { |
| 2733 | let output = lex(source, Mode::Module, TextSize::default()); |
| 2734 | match output |
| 2735 | .errors |
| 2736 | .into_iter() |
| 2737 | .next() |
| 2738 | .expect("lexer should give at least one error") |
| 2739 | .into_error() |
| 2740 | { |
| 2741 | LexicalErrorType::FStringError(error) => error, |
| 2742 | err => panic!("Expected FStringError: {err:?}"), |
| 2743 | } |
| 2744 | } |
| 2745 | |
| 2746 | #[test] |
| 2747 | fn test_fstring_error() { |