Add Python literal string interpolation pattern

This commit is contained in:
HiPhish 2024-03-23 16:20:21 +01:00
parent 2200900e3c
commit 580bc045c7
3 changed files with 9 additions and 0 deletions

View file

@ -43,6 +43,7 @@ Added
- Missing patterns for Python:
- `dict_pattern`
- `import_from_statement`
- `interpolation` (literal string interpolation)
- `list_pattern`
- `tuple_pattern`
- Missing patterns for Rust:

View file

@ -68,3 +68,8 @@
(import_from_statement
"(" @delimiter
")" @delimiter @sentinel) @container
(string
(interpolation
"{" @delimiter
"}" @delimiter @sentinel) @container)

View file

@ -44,3 +44,6 @@ print(zero[zero[zero[0]]])
print(2 + ((((3)))))
print(len(my_list))
# Format-string with embedded delimiters
print(f'The sum of 2 and 3 is {2 + (1 + 2)}')