From 836ac8ef9675c7c1577ad42a7fcbdb9ab593c02c Mon Sep 17 00:00:00 2001 From: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com> Date: Tue, 2 Sep 2025 12:48:26 +0100 Subject: [PATCH] gh-110936: Reorder string literal definition in Lexical Analysis (GH-138063) (cherry picked from commit 0a0cbd43a7404b2a5b86ca032764e4524bdecd83) Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com> --- Doc/reference/lexical_analysis.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/reference/lexical_analysis.rst b/Doc/reference/lexical_analysis.rst index e320eedfa67a27..6338c181813bbe 100644 --- a/Doc/reference/lexical_analysis.rst +++ b/Doc/reference/lexical_analysis.rst @@ -628,10 +628,10 @@ to indicate that an ending quote ends the literal. STRING: [`stringprefix`] (`stringcontent`) stringprefix: <("r" | "u" | "b" | "br" | "rb"), case-insensitive> stringcontent: - | "'" ( !"'" `stringitem`)* "'" - | '"' ( !'"' `stringitem`)* '"' | "'''" ( !"'''" `longstringitem`)* "'''" | '"""' ( !'"""' `longstringitem`)* '"""' + | "'" ( !"'" `stringitem`)* "'" + | '"' ( !'"' `stringitem`)* '"' stringitem: `stringchar` | `stringescapeseq` stringchar: longstringitem: `stringitem` | newline