(source: &str)
| 2595 | } |
| 2596 | |
| 2597 | fn lex_fstring_error(source: &str) -> InterpolatedStringErrorType { |
| 2598 | let output = lex(source, Mode::Module, TextSize::default()); |
| 2599 | match output |
| 2600 | .errors |
| 2601 | .into_iter() |
| 2602 | .next() |
| 2603 | .expect("lexer should give at least one error") |
| 2604 | .into_error() |
| 2605 | { |
| 2606 | LexicalErrorType::FStringError(error) => error, |
| 2607 | err => panic!("Expected FStringError: {err:?}"), |
| 2608 | } |
| 2609 | } |
| 2610 | |
| 2611 | #[test] |
| 2612 | fn test_fstring_error() { |