summaryrefslogtreecommitdiffstats
path: root/Grammar
diff options
context:
space:
mode:
authorPablo Galindo Salgado <Pablogsal@gmail.com>2023-06-02 11:33:26 (GMT)
committerGitHub <noreply@github.com>2023-06-02 11:33:26 (GMT)
commit41de54378d54f7ffc38f07db4219e80f48c4249e (patch)
tree42b56206d421d532fb2ac1a9cce7a31458ab26c4 /Grammar
parent4bfa01b9d911ce9358cf1a453bee15554f8e4c07 (diff)
downloadcpython-41de54378d54f7ffc38f07db4219e80f48c4249e.zip
cpython-41de54378d54f7ffc38f07db4219e80f48c4249e.tar.gz
cpython-41de54378d54f7ffc38f07db4219e80f48c4249e.tar.bz2
gh-105194: Fix format specifier escaped characters in f-strings (#105231)
Diffstat (limited to 'Grammar')
-rw-r--r--Grammar/python.gram2
1 files changed, 1 insertions, 1 deletions
diff --git a/Grammar/python.gram b/Grammar/python.gram
index 9131835..6b2a46a 100644
--- a/Grammar/python.gram
+++ b/Grammar/python.gram
@@ -923,7 +923,7 @@ fstring_conversion[ResultTokenWithMetadata*]:
fstring_full_format_spec[ResultTokenWithMetadata*]:
| colon=':' spec=fstring_format_spec* { _PyPegen_setup_full_format_spec(p, colon, (asdl_expr_seq *) spec, EXTRA) }
fstring_format_spec[expr_ty]:
- | t=FSTRING_MIDDLE { _PyPegen_constant_from_token(p, t) }
+ | t=FSTRING_MIDDLE { _PyPegen_decoded_constant_from_token(p, t) }
| fstring_replacement_field
fstring[expr_ty]:
| a=FSTRING_START b=fstring_middle* c=FSTRING_END { _PyPegen_joined_str(p, a, (asdl_expr_seq*)b, c) }