mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
[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:
parent
62294eb4fc
commit
284ab76d4e
1 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue