Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Any f-string allows variable interpolation, that includes a raw f-string. Make all raw prefixes (`r` or `R`) behave the same way in combination with `f` prefix. Fixes #186
- Loading branch information
1 parent
db32a0d
commit 5b5f388
Showing
19 changed files
with
546 additions
and
3,434 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
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,40 @@ | ||
a = fr'[a-z]' | ||
a = Fr'[a-z]' | ||
a = rf'[a-z]' | ||
a = rF'[a-z]' | ||
|
||
|
||
|
||
|
||
a : source.python | ||
: source.python | ||
= : keyword.operator.assignment.python, source.python | ||
: source.python | ||
fr : meta.fstring.python, source.python, storage.type.string.python, string.interpolated.python, string.quoted.raw.single.python | ||
' : meta.fstring.python, punctuation.definition.string.begin.python, source.python, string.quoted.raw.single.python | ||
[a-z] : meta.fstring.python, source.python, string.interpolated.python, string.quoted.raw.single.python | ||
' : meta.fstring.python, punctuation.definition.string.end.python, source.python, string.interpolated.python, string.quoted.raw.single.python | ||
a : source.python | ||
: source.python | ||
= : keyword.operator.assignment.python, source.python | ||
: source.python | ||
Fr : meta.fstring.python, source.python, storage.type.string.python, string.interpolated.python, string.quoted.raw.single.python | ||
' : meta.fstring.python, punctuation.definition.string.begin.python, source.python, string.quoted.raw.single.python | ||
[a-z] : meta.fstring.python, source.python, string.interpolated.python, string.quoted.raw.single.python | ||
' : meta.fstring.python, punctuation.definition.string.end.python, source.python, string.interpolated.python, string.quoted.raw.single.python | ||
a : source.python | ||
: source.python | ||
= : keyword.operator.assignment.python, source.python | ||
: source.python | ||
rf : meta.fstring.python, source.python, storage.type.string.python, string.interpolated.python, string.quoted.raw.single.python | ||
' : meta.fstring.python, punctuation.definition.string.begin.python, source.python, string.quoted.raw.single.python | ||
[a-z] : meta.fstring.python, source.python, string.interpolated.python, string.quoted.raw.single.python | ||
' : meta.fstring.python, punctuation.definition.string.end.python, source.python, string.interpolated.python, string.quoted.raw.single.python | ||
a : source.python | ||
: source.python | ||
= : keyword.operator.assignment.python, source.python | ||
: source.python | ||
rF : meta.fstring.python, source.python, storage.type.string.python, string.interpolated.python, string.quoted.raw.single.python | ||
' : meta.fstring.python, punctuation.definition.string.begin.python, source.python, string.quoted.raw.single.python | ||
[a-z] : meta.fstring.python, source.python, string.interpolated.python, string.quoted.raw.single.python | ||
' : meta.fstring.python, punctuation.definition.string.end.python, source.python, string.interpolated.python, string.quoted.raw.single.python |
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,36 @@ | ||
rf'fo{{2}}' | ||
rf"fo{{2}}" | ||
rf'''fo{{2}}''' | ||
rf"""fo{{2}}""" | ||
|
||
|
||
|
||
|
||
rf : meta.fstring.python, source.python, storage.type.string.python, string.interpolated.python, string.quoted.raw.single.python | ||
' : meta.fstring.python, punctuation.definition.string.begin.python, source.python, string.quoted.raw.single.python | ||
fo : meta.fstring.python, source.python, string.interpolated.python, string.quoted.raw.single.python | ||
{{ : constant.character.escape.python, meta.fstring.python, source.python | ||
2 : meta.fstring.python, source.python, string.interpolated.python, string.quoted.raw.single.python | ||
}} : constant.character.escape.python, meta.fstring.python, source.python | ||
' : meta.fstring.python, punctuation.definition.string.end.python, source.python, string.interpolated.python, string.quoted.raw.single.python | ||
rf : meta.fstring.python, source.python, storage.type.string.python, string.interpolated.python, string.quoted.raw.single.python | ||
" : meta.fstring.python, punctuation.definition.string.begin.python, source.python, string.quoted.raw.single.python | ||
fo : meta.fstring.python, source.python, string.interpolated.python, string.quoted.raw.single.python | ||
{{ : constant.character.escape.python, meta.fstring.python, source.python | ||
2 : meta.fstring.python, source.python, string.interpolated.python, string.quoted.raw.single.python | ||
}} : constant.character.escape.python, meta.fstring.python, source.python | ||
" : meta.fstring.python, punctuation.definition.string.end.python, source.python, string.interpolated.python, string.quoted.raw.single.python | ||
rf : meta.fstring.python, source.python, storage.type.string.python, string.interpolated.python, string.quoted.raw.multi.python | ||
''' : meta.fstring.python, punctuation.definition.string.begin.python, source.python, string.quoted.raw.multi.python | ||
fo : meta.fstring.python, source.python, string.interpolated.python, string.quoted.raw.multi.python | ||
{{ : constant.character.escape.python, meta.fstring.python, source.python | ||
2 : meta.fstring.python, source.python, string.interpolated.python, string.quoted.raw.multi.python | ||
}} : constant.character.escape.python, meta.fstring.python, source.python | ||
''' : meta.fstring.python, punctuation.definition.string.end.python, source.python, string.interpolated.python, string.quoted.raw.multi.python | ||
rf : meta.fstring.python, source.python, storage.type.string.python, string.interpolated.python, string.quoted.raw.multi.python | ||
""" : meta.fstring.python, punctuation.definition.string.begin.python, source.python, string.quoted.raw.multi.python | ||
fo : meta.fstring.python, source.python, string.interpolated.python, string.quoted.raw.multi.python | ||
{{ : constant.character.escape.python, meta.fstring.python, source.python | ||
2 : meta.fstring.python, source.python, string.interpolated.python, string.quoted.raw.multi.python | ||
}} : constant.character.escape.python, meta.fstring.python, source.python | ||
""" : meta.fstring.python, punctuation.definition.string.end.python, source.python, string.interpolated.python, string.quoted.raw.multi.python |
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,36 @@ | ||
rf'fo{2}' | ||
rf"fo{2}" | ||
rf'''fo{2}''' | ||
rf"""fo{2}""" | ||
|
||
|
||
|
||
|
||
rf : meta.fstring.python, source.python, storage.type.string.python, string.interpolated.python, string.quoted.raw.single.python | ||
' : meta.fstring.python, punctuation.definition.string.begin.python, source.python, string.quoted.raw.single.python | ||
fo : meta.fstring.python, source.python, string.interpolated.python, string.quoted.raw.single.python | ||
{ : constant.character.format.placeholder.other.python, meta.fstring.python, source.python | ||
2 : constant.numeric.dec.python, meta.fstring.python, source.python | ||
} : constant.character.format.placeholder.other.python, meta.fstring.python, source.python | ||
' : meta.fstring.python, punctuation.definition.string.end.python, source.python, string.interpolated.python, string.quoted.raw.single.python | ||
rf : meta.fstring.python, source.python, storage.type.string.python, string.interpolated.python, string.quoted.raw.single.python | ||
" : meta.fstring.python, punctuation.definition.string.begin.python, source.python, string.quoted.raw.single.python | ||
fo : meta.fstring.python, source.python, string.interpolated.python, string.quoted.raw.single.python | ||
{ : constant.character.format.placeholder.other.python, meta.fstring.python, source.python | ||
2 : constant.numeric.dec.python, meta.fstring.python, source.python | ||
} : constant.character.format.placeholder.other.python, meta.fstring.python, source.python | ||
" : meta.fstring.python, punctuation.definition.string.end.python, source.python, string.interpolated.python, string.quoted.raw.single.python | ||
rf : meta.fstring.python, source.python, storage.type.string.python, string.interpolated.python, string.quoted.raw.multi.python | ||
''' : meta.fstring.python, punctuation.definition.string.begin.python, source.python, string.quoted.raw.multi.python | ||
fo : meta.fstring.python, source.python, string.interpolated.python, string.quoted.raw.multi.python | ||
{ : constant.character.format.placeholder.other.python, meta.fstring.python, source.python | ||
2 : constant.numeric.dec.python, meta.fstring.python, source.python | ||
} : constant.character.format.placeholder.other.python, meta.fstring.python, source.python | ||
''' : meta.fstring.python, punctuation.definition.string.end.python, source.python, string.interpolated.python, string.quoted.raw.multi.python | ||
rf : meta.fstring.python, source.python, storage.type.string.python, string.interpolated.python, string.quoted.raw.multi.python | ||
""" : meta.fstring.python, punctuation.definition.string.begin.python, source.python, string.quoted.raw.multi.python | ||
fo : meta.fstring.python, source.python, string.interpolated.python, string.quoted.raw.multi.python | ||
{ : constant.character.format.placeholder.other.python, meta.fstring.python, source.python | ||
2 : constant.numeric.dec.python, meta.fstring.python, source.python | ||
} : constant.character.format.placeholder.other.python, meta.fstring.python, source.python | ||
""" : meta.fstring.python, punctuation.definition.string.end.python, source.python, string.interpolated.python, string.quoted.raw.multi.python |
Oops, something went wrong.