Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
d08972fd
Commit
d08972fd
authored
Apr 11, 2018
by
Serhiy Storchaka
Committed by
GitHub
Apr 11, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpo-33260: Regenerate token.py after removing ASYNC and AWAIT. (GH-6447)
parent
c4b695f8
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
9 deletions
+7
-9
Doc/reference/expressions.rst
Doc/reference/expressions.rst
+1
-1
Lib/token.py
Lib/token.py
+5
-7
Lib/tokenize.py
Lib/tokenize.py
+1
-1
No files found.
Doc/reference/expressions.rst
View file @
d08972fd
...
...
@@ -172,7 +172,7 @@ Common syntax elements for comprehensions are:
.. productionlist::
comprehension: `expression` `comp_for`
comp_for: [
ASYNC
] "for" `target_list` "in" `or_test` [`comp_iter`]
comp_for: [
"async"
] "for" `target_list` "in" `or_test` [`comp_iter`]
comp_iter: `comp_for` | `comp_if`
comp_if: "if" `expression_nocond` [`comp_iter`]
...
...
Lib/token.py
View file @
d08972fd
...
...
@@ -65,14 +65,12 @@ RARROW = 51
ELLIPSIS
=
52
# Don't forget to update the table _PyParser_TokenNames in tokenizer.c!
OP
=
53
AWAIT
=
54
ASYNC
=
55
ERRORTOKEN
=
56
ERRORTOKEN
=
54
# These aren't used by the C tokenizer but are needed for tokenize.py
COMMENT
=
5
7
NL
=
5
8
ENCODING
=
5
9
N_TOKENS
=
60
COMMENT
=
5
5
NL
=
5
6
ENCODING
=
5
7
N_TOKENS
=
58
# Special definitions for cooperation with parser
NT_OFFSET
=
256
#--end constants--
...
...
Lib/tokenize.py
View file @
d08972fd
...
...
@@ -284,7 +284,7 @@ class Untokenizer:
self.encoding = tokval
continue
if toknum in (NAME, NUMBER
, ASYNC, AWAIT
):
if toknum in (NAME, NUMBER):
tokval += '
'
# Insert a space between two consecutive strings
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment