Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
cython
Commits
3511ed4e
Commit
3511ed4e
authored
Jul 24, 2015
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix an edge case where resetting async/await keywords occurred too late
parent
918654ad
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
Cython/Compiler/Scanning.py
Cython/Compiler/Scanning.py
+3
-1
tests/run/test_coroutines_pep492.pyx
tests/run/test_coroutines_pep492.pyx
+1
-0
No files found.
Cython/Compiler/Scanning.py
View file @
3511ed4e
...
...
@@ -317,7 +317,7 @@ class PyrexScanner(Scanner):
self
.
indentation_stack
=
[
0
]
self
.
indentation_char
=
None
self
.
bracket_nesting_level
=
0
self
.
async_enabled
=
False
self
.
async_enabled
=
0
self
.
begin
(
'INDENT'
)
self
.
sy
=
''
self
.
next
()
...
...
@@ -506,3 +506,5 @@ class PyrexScanner(Scanner):
if
not
self
.
async_enabled
:
self
.
keywords
.
discard
(
'await'
)
self
.
keywords
.
discard
(
'async'
)
if
self
.
sy
in
(
'async'
,
'await'
):
self
.
sy
,
self
.
systring
=
IDENT
,
self
.
context
.
intern_ustring
(
self
.
sy
)
tests/run/test_coroutines_pep492.pyx
View file @
3511ed4e
...
...
@@ -368,6 +368,7 @@ class AsyncBadSyntaxTest(unittest.TestCase):
async
def
f
(
z
):
async
def
g
():
pass
await
z
await
=
1
#self.assertTrue(inspect.iscoroutinefunction(f))
...
...
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