-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test for empty
FStringMiddle
tok in lambda expr
- Loading branch information
1 parent
098ee5d
commit 1f5c3ea
Showing
2 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
42 changes: 42 additions & 0 deletions
42
...arser/src/snapshots/ruff_python_parser__lexer__tests__fstring_with_lambda_expression.snap
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
--- | ||
source: crates/ruff_python_parser/src/lexer.rs | ||
expression: lex_source(source) | ||
--- | ||
[ | ||
FStringStart, | ||
Lbrace, | ||
Lambda, | ||
Name { | ||
name: "x", | ||
}, | ||
Colon, | ||
Lbrace, | ||
Name { | ||
name: "x", | ||
}, | ||
Rbrace, | ||
FStringMiddle { | ||
value: "", | ||
is_raw: false, | ||
}, | ||
Rbrace, | ||
FStringEnd, | ||
Newline, | ||
FStringStart, | ||
Lbrace, | ||
Lpar, | ||
Lambda, | ||
Name { | ||
name: "x", | ||
}, | ||
Colon, | ||
Lbrace, | ||
Name { | ||
name: "x", | ||
}, | ||
Rbrace, | ||
Rpar, | ||
Rbrace, | ||
FStringEnd, | ||
Newline, | ||
] |