rcl/golden/error/parse_fstring_double_hole_unclosed.test
Ruud van Asseldonk 22cdb13bd6 Improve errors for Unicode escape sequences
Lexing from \u{ until the closing } works for valid documents, but if
you forget the closing }, it will go also past the closing " and create
very puzzling errors. So limit what we parse to hex digits then, and
report the errors slightly differently.
2023-09-30 02:18:50 +02:00

14 lines
335 B
Text

f"This f-string is not closed.{0 0}"
# output:
stdin:1:34
1 │ f"This f-string is not closed.{0 0}"
╵ ^
Error: Expected '}' here to close format string hole.
stdin:1:31
1 │ f"This f-string is not closed.{0 0}"
╵ ^
Note: Unmatched '{' opened here.