From 0a0cbd43a7404b2a5b86ca032764e4524bdecd83 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) --- 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 e320eedfa67a..6338c181813b 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 -- 2.47.3