gh-110936: Reorder string literal definition in Lexical Analysis (GH-138063)

This commit is contained in:
Stan Ulbrych 2025-09-02 12:48:26 +01:00 committed by GitHub
parent cb18269e1b
commit 0a0cbd43a7
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