[3.14] gh-110936: Reorder string literal definition in Lexical Analysis (GH-138063) (#138373)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
This commit is contained in:
Miss Islington (bot) 2025-09-16 15:56:17 +02:00 committed by GitHub
parent 62294eb4fc
commit 284ab76d4e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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: <any `source_character`, except backslash and newline>
longstringitem: `stringitem` | newline