LibCST/native/libcst/src/tokenizer
martin 48668dfabb
Support parsing of t-strings #1374 (#1398)
#1343
Adds support to parse t-strings

Couple things of note:

TemplatedString* is largely a copy of FormattedString*
Since clients operate of libcst objects I consider this this part of a public API - following the python grammar (where TStrings are distinct from FStrings) seems like a good way to avoid changes to the API in the future.
Within the tokenizer we reuse the fstring machinery
I consider this an implementation detail, fstrings and tstrings are (for now) identical, we can change this later without changes to the public api.
Since 2 -> we have a new FTStringType enum
We need to discriminate between f and t strings to know which token to return, a bit clumsy to use in my opinion - so looking for feedback here on how to improve this.
2025-09-09 11:16:20 -04:00
..
core Support parsing of t-strings #1374 (#1398) 2025-09-09 11:16:20 -04:00
text_position Remove need for regex in TextPosition::matches (#1002) 2023-08-27 16:29:20 +01:00
debug_utils.rs fix copyright headers and add a script to check (#635) 2022-02-01 11:13:17 +00:00
mod.rs fix copyright headers and add a script to check (#635) 2022-02-01 11:13:17 +00:00
operators.rs Support parsing of t-strings #1374 (#1398) 2025-09-09 11:16:20 -04:00
tests.rs Support parsing of t-strings #1374 (#1398) 2025-09-09 11:16:20 -04:00
whitespace_parser.rs parser: remove Regexes from whitespace parser (#1008) 2023-09-09 17:03:01 +01:00