-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Implement template strings #17851
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Implement template strings #17851
Changes from all commits
Commits
Show all changes
72 commits
Select commit
Hold shift + click to select a range
a7afa1f
[parser] lex t-strings
dylwil3 1a59d79
[parser] add tests for lexer
dylwil3 5456e34
[parser] update AST to handle template strings
dylwil3 c7af36b
[parser] add parser errors for t-strings
dylwil3 e09c3d7
[parser] unsupported syntax error for t-strings
dylwil3 ebb7ef2
[parser] copy-pasted parts of parser
dylwil3 88c7875
[parser] new logic for implicit concatenation
dylwil3 21114ed
[parser] add tests for parser
dylwil3 806e82a
[formatter] run generate.py
dylwil3 cbfa404
[formatter] implement formatting
dylwil3 8caa321
[formatter] test equivariance under f<-->t swap
dylwil3 60d1513
[formatter] add fixtures and snapshots
dylwil3 553193f
[linter] minimal type inference in ruff semantic
dylwil3 0c1b0ef
[linter] minimal changes to compile
dylwil3 d353710
[linter] minimal changes to codegen to compile
dylwil3 841eeba
[ty] infer t-strings as todo recursively
dylwil3 24a0e6f
why did these snapshots change even after rebase on main?
dylwil3 34b63ac
also confused about these snapshot and test changes
dylwil3 5a306b1
format after rebase
dylwil3 4dda44d
fix rebase artifacts and rust update issues
dylwil3 907506a
[parser] unify f-string and t-string error types
dylwil3 fede679
[parser] remove `kind` field from ft-context
dylwil3 6b6e4a5
[parser] merge lexing methods
dylwil3 2b7da24
[parser] merge f and t-string literal elements structs and parsing
dylwil3 a51a59c
[parser] update snapshots with new node name
dylwil3 8564542
[parser] merge nodes for elements and inner flags
dylwil3 d84f01e
[parser] unify lexing and parsing for f/t strings
dylwil3 c0369a4
[parser] fixup ast integration tests
dylwil3 df0a88a
[linter] minimal changes to compile
dylwil3 d300383
[codegen] minimal changes to compile
dylwil3 bc1614d
[ty] minimal changes to compile
dylwil3 a752703
[formatter] merge some structs but not yet logic
dylwil3 5822e6e
[parser] update tests and snapshots
dylwil3 05df570
[linter] semantic model flags t strings on visit
dylwil3 0683afa
[linter] update fixtures and snapshots for affected rules
dylwil3 f80d017
update some doc refs
dylwil3 52aef67
[formatter] merge logic for assignment statements
dylwil3 27eaf9c
accomodate report_diagnostics deletion on main
dylwil3 df36eb4
make wasm clippy and release compiler happy
dylwil3 370c076
[parser] correct `ComparableExpr` implementation
dylwil3 3d86606
[parser] add some tests for comparable exprs
dylwil3 7a91838
[parser] combine some string flags
dylwil3 c1e7c03
[parser] move FTStringKind to parser crate
dylwil3 0cff55c
[parser] LexicalErrorType from ftstring error
dylwil3 cfab271
[parser] TokenKind is ftstring end
dylwil3 c20ab31
[parser] Modify constructor for FTStringContext to return Option
dylwil3 7bc09bc
nits
dylwil3 dd215d2
clippy
dylwil3 5c7c314
[parser] use start_token,middle_token,end_token methods
dylwil3 e45a759
f-->t in doc comment
dylwil3 87812ce
[parser] remove InterpolatedString trait
dylwil3 6d902dc
[parser] remove TStringFormatSpec
dylwil3 3915019
[parser] docs and explanation for F/TStringFlags
dylwil3 f8adf84
[parser] add latest_preview method to PythonVersion
dylwil3 531a0b0
track caller in assert for tests
dylwil3 7c47693
[parser] lex ftstring start return Option avoid expect
dylwil3 a083c5e
[formatter] delete dead code
dylwil3 f026a01
[formatter] respond to smaller code review comments
dylwil3 45839db
[formatter] unify stmt_assign formatting
dylwil3 0220e11
[formatter] unify format implicit concat flat
dylwil3 f0a4ff5
[formatter] unify is_multiline logic
dylwil3 0b7bbaf
[formatter] unify is_ftstring_with_quoted_format_spec_and_debug
dylwil3 4f88251
clippy
dylwil3 445206d
merge main
dylwil3 8e7e1e2
clippy
dylwil3 8ee9fbb
respond to comments except naming and test to remove
dylwil3 b747266
update snapshot
dylwil3 3105750
Merge branch 'main' into template-strings
dylwil3 8a60cb8
respond to non naming-related comments
dylwil3 bc5170b
the great name change
dylwil3 8f45ff1
update snapshots with new names
dylwil3 d8705ac
delete my fun test of f and t string format compat
dylwil3 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.