You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 00:45:53 +08:00
Sync 3.7 async_forelse with decompyle3
This commit is contained in:
@@ -590,6 +590,7 @@ class Python37Parser(Python37BaseParser):
|
||||
# Order of LOAD_CONST YIELD_FROM is switched from 3.6 to save a LOAD_CONST
|
||||
async_for_stmt37 ::= setup_loop expr
|
||||
GET_AITER
|
||||
_come_froms
|
||||
SETUP_EXCEPT GET_ANEXT
|
||||
LOAD_CONST YIELD_FROM
|
||||
store
|
||||
@@ -602,6 +603,7 @@ class Python37Parser(Python37BaseParser):
|
||||
|
||||
async_forelse_stmt ::= setup_loop expr
|
||||
GET_AITER
|
||||
_come_froms
|
||||
SETUP_EXCEPT GET_ANEXT LOAD_CONST
|
||||
YIELD_FROM
|
||||
store
|
||||
|
@@ -62,9 +62,9 @@ def customize_for_version37(self, version):
|
||||
),
|
||||
"async_for_stmt37": (
|
||||
"%|async for %c in %c:\n%+%c%-\n\n",
|
||||
(7, "store"),
|
||||
(8, "store"),
|
||||
(1, "expr"),
|
||||
(16, "for_block"),
|
||||
(17, "for_block"),
|
||||
),
|
||||
"async_with_stmt": ("%|async with %c:\n%+%c%-", (0, "expr"), 3),
|
||||
"async_with_as_stmt": (
|
||||
@@ -75,10 +75,10 @@ def customize_for_version37(self, version):
|
||||
),
|
||||
"async_forelse_stmt": (
|
||||
"%|async for %c in %c:\n%+%c%-%|else:\n%+%c%-\n\n",
|
||||
(7, "store"),
|
||||
(8, "store"),
|
||||
(1, "expr"),
|
||||
(17, "for_block"),
|
||||
(25, "else_suite"),
|
||||
(-10, "for_block"),
|
||||
(-2, "else_suite"),
|
||||
),
|
||||
"attribute37": ("%c.%[1]{pattr}", (0, "expr")),
|
||||
"attributes37": ("%[0]{pattr} import %c",
|
||||
|
Reference in New Issue
Block a user