(source: &str)
| 2580 | } |
| 2581 | |
| 2582 | fn lex_fstring_error(source: &str) -> InterpolatedStringErrorType { |
| 2583 | let output = lex(source, Mode::Module, TextSize::default()); |
| 2584 | match output |
| 2585 | .errors |
| 2586 | .into_iter() |
| 2587 | .next() |
| 2588 | .expect("lexer should give at least one error") |
| 2589 | .into_error() |
| 2590 | { |
| 2591 | LexicalErrorType::FStringError(error) => error, |
| 2592 | err => panic!("Expected FStringError: {err:?}"), |
| 2593 | } |
| 2594 | } |
| 2595 | |
| 2596 | #[test] |
| 2597 | fn test_fstring_error() { |