Skip to content

Add support for Python t-strings#328

Closed
jpe wants to merge 1 commit intoScintillaOrg:masterfrom
jpe:py-t-strings
Closed

Add support for Python t-strings#328
jpe wants to merge 1 commit intoScintillaOrg:masterfrom
jpe:py-t-strings

Conversation

@jpe
Copy link
Copy Markdown
Contributor

@jpe jpe commented Aug 21, 2025

Adds support for t-strings by treating them as f-strings -- using the same lexer states, state stack, and logic. Tests are just the f-string tests with f" replaced by t".

@nyamatongwe nyamatongwe added the python Caused by the Python lexer label Aug 22, 2025
@nyamatongwe
Copy link
Copy Markdown
Member

I'll look at this in October, after my vacation.

@jpe
Copy link
Copy Markdown
Contributor Author

jpe commented Aug 22, 2025

I thought that would be the case. I hope you're having a good vacation!

Comment thread lexers/LexPython.cxx
"Set to 0 to use pre-PEP 701 / Python 3.12 f-string lexing.");

DefineProperty("lexer.python.strings.t", &OptionsPython::stringsT,
"Set to 0 to not recognise Python 3.14 t-string literals f\"var={var}\".");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A typo, t\"var={var}\"

nyamatongwe pushed a commit that referenced this pull request Oct 4, 2025
@nyamatongwe nyamatongwe added the committed Issue fixed in repository but not in release label Oct 4, 2025
@nyamatongwe
Copy link
Copy Markdown
Member

Committed. Included the typo fix from @zufuliu.

@nyamatongwe nyamatongwe removed the committed Issue fixed in repository but not in release label Nov 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

python Caused by the Python lexer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants