mirror of
https://github.com/python/cpython.git
synced 2025-07-07 19:35:27 +00:00
gh-102856: Initial implementation of PEP 701 (#102855)
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com> Co-authored-by: Batuhan Taskaya <isidentical@gmail.com> Co-authored-by: Marta Gómez Macías <mgmacias@google.com> Co-authored-by: sunmy2019 <59365878+sunmy2019@users.noreply.github.com>
This commit is contained in:
parent
a6b07b5a34
commit
1ef61cf71a
27 changed files with 8859 additions and 6573 deletions
27
Lib/token.py
generated
27
Lib/token.py
generated
|
@ -57,18 +57,22 @@ ATEQUAL = 50
|
|||
RARROW = 51
|
||||
ELLIPSIS = 52
|
||||
COLONEQUAL = 53
|
||||
OP = 54
|
||||
AWAIT = 55
|
||||
ASYNC = 56
|
||||
TYPE_IGNORE = 57
|
||||
TYPE_COMMENT = 58
|
||||
SOFT_KEYWORD = 59
|
||||
EXCLAMATION = 54
|
||||
OP = 55
|
||||
AWAIT = 56
|
||||
ASYNC = 57
|
||||
TYPE_IGNORE = 58
|
||||
TYPE_COMMENT = 59
|
||||
SOFT_KEYWORD = 60
|
||||
FSTRING_START = 61
|
||||
FSTRING_MIDDLE = 62
|
||||
FSTRING_END = 63
|
||||
# These aren't used by the C tokenizer but are needed for tokenize.py
|
||||
ERRORTOKEN = 60
|
||||
COMMENT = 61
|
||||
NL = 62
|
||||
ENCODING = 63
|
||||
N_TOKENS = 64
|
||||
ERRORTOKEN = 64
|
||||
COMMENT = 65
|
||||
NL = 66
|
||||
ENCODING = 67
|
||||
N_TOKENS = 68
|
||||
# Special definitions for cooperation with parser
|
||||
NT_OFFSET = 256
|
||||
|
||||
|
@ -78,6 +82,7 @@ tok_name = {value: name
|
|||
__all__.extend(tok_name.values())
|
||||
|
||||
EXACT_TOKEN_TYPES = {
|
||||
'!': EXCLAMATION,
|
||||
'!=': NOTEQUAL,
|
||||
'%': PERCENT,
|
||||
'%=': PERCENTEQUAL,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue