mirror of
https://github.com/python/cpython.git
synced 2026-01-06 07:22:09 +00:00
gh-110936: Reorder string literal definition in Lexical Analysis (GH-138063)
This commit is contained in:
parent
cb18269e1b
commit
0a0cbd43a7
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