You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-04 01:09:52 +08:00
3.6-3.8 "async for" handling...
And add an if_stmt rule for 3.8. My want to extend it back to other versions.
This commit is contained in:
@@ -68,6 +68,22 @@ class Python36Parser(Python35Parser):
|
||||
for_block POP_BLOCK
|
||||
COME_FROM_LOOP
|
||||
|
||||
stmt ::= async_for_stmt36
|
||||
|
||||
async_for_stmt36 ::= SETUP_LOOP expr
|
||||
GET_AITER
|
||||
LOAD_CONST YIELD_FROM
|
||||
SETUP_EXCEPT GET_ANEXT LOAD_CONST
|
||||
YIELD_FROM
|
||||
store
|
||||
POP_BLOCK JUMP_BACK COME_FROM_EXCEPT DUP_TOP
|
||||
LOAD_GLOBAL COMPARE_OP POP_JUMP_IF_TRUE
|
||||
END_FINALLY for_block
|
||||
COME_FROM
|
||||
POP_TOP POP_TOP POP_TOP POP_EXCEPT
|
||||
POP_TOP POP_BLOCK
|
||||
COME_FROM_LOOP
|
||||
|
||||
async_forelse_stmt ::= SETUP_LOOP expr
|
||||
GET_AITER
|
||||
LOAD_CONST YIELD_FROM SETUP_EXCEPT GET_ANEXT LOAD_CONST
|
||||
@@ -363,6 +379,7 @@ class Python36Parser(Python35Parser):
|
||||
pass
|
||||
pass
|
||||
return False
|
||||
|
||||
class Python36ParserSingle(Python36Parser, PythonParserSingle):
|
||||
pass
|
||||
|
||||
|
Reference in New Issue
Block a user