Fox some 3.6 async_forelse parsing

This commit is contained in:
rocky
2022-05-05 07:09:39 -04:00
parent f9a1f6fcd9
commit c5efec1e6f
4 changed files with 31 additions and 10 deletions

View File

@@ -48,7 +48,7 @@ def customize_for_version35(self, version):
(9, "store"),
(1, "expr"),
(25, "for_block"),
(27, "else_suite"),
(-2, "else_suite"),
),
"async_with_stmt": (
"%|async with %c:\n%+%c%-",

View File

@@ -63,6 +63,13 @@ def customize_for_version36(self, version):
(1, "expr"),
(-9, "for_block"), # Count from end, since COME_FROM shifts things in the forward direction
),
"async_forelse_stmt36": (
"%|async for %c in %c:\n%+%c%-%|else:\n%+%c%-\n\n",
(9, "store"),
(1, "expr"),
(-9, "for_block"),
(-2, "else_suite"),
),
"call_ex": ("%c(%p)", (0, "expr"), (1, 100)),
"except_return": ("%|except:\n%+%c%-", 3),
"func_args36": ("%c(**", 0),