Commit Graph

73 Commits

Author SHA1 Message Date
rocky
c68b74a9c6 new dis - Python compisons involving tuples 2021-10-15 23:39:59 -04:00
rocky
a215ee2f00 Use "co_consts" in docstring detection.
Note: this is an upheaval because we need to pass "code" or at least
"code.co_consts" to the docstring detection routine
2020-07-21 10:31:07 -04:00
rocky
5a83c7c643 Simplify imports again using xdis 4.6.0 2020-05-19 00:53:53 -04:00
rocky
869e48877c Convert to use xdis 4.3.0 or greater 2020-04-16 08:41:53 -04:00
rocky
a616e1e1c7 "withstmt" -> "with" and fix async for 2020-04-01 09:48:34 -04:00
rocky
e2d349f781 Handle nested async for in for...
and Better async comprehension detection.

Still more work is needed. See commented-out section in
test/simple_source/bug37/02_async_for_generator.py
2020-03-31 12:05:39 -04:00
rocky
278af38df6 conditional -> if_exp ...
to match Python IfExp AST
2020-02-07 16:17:47 -05:00
rocky
f4e6382cc1 Specialize "classdef" nonterminal for 3.6+ 2020-01-21 04:56:11 -05:00
rocky
e466e826b3 Small bug in 3.6+ in finding class name 2020-01-20 22:43:20 -05:00
rocky
aaba4ecb2b Better try/else/finally for 3.x 2020-01-11 21:33:22 -05:00
rocky
07f16fa040 need to relax node checking on tryelsesmtl3...
now that except_handler_else is derived from except_handler.
2020-01-09 23:24:42 -05:00
rocky
fedd5e0ba5 Better "try" vs. "try"/"else" disambiguation ...
via reduction check that was originally only in 2.7
2020-01-09 22:37:02 -05:00
rocky
7d24910b3c "with .. as" with tuples need parens in 3.0 so always add (). 2020-01-08 12:02:34 -05:00
rocky
566143b515 Python 3.7+ optimized if in comprehension 2019-12-28 18:09:00 -05:00
rocky
37301ab49e Was dropping docstrings! Add in decompyle make_function36 2019-12-27 11:41:03 -05:00
rocky
97e3a7eb02 Split out make_function.py into v2 and v3 versions
A custom 3.3 make_function will be coming soon.
2019-12-27 03:32:15 -05:00
rocky
e39c6c7f0a Fix "with as" indenting and decorated "async def"
Misc other improvements: make check-short now is short
2019-12-18 09:14:09 -05:00
rocky
8470bded59 Bugs found in test_complex.py
list comprehensions from 3.x closures didn't handle nested for's
before 3.6.

Handle nanj and infj.
2019-12-17 18:27:43 -05:00
rocky
c6ddefcef5 Merging in recent 3.7 and 3.8 improvements from decompyle6
This rebases 3.7, 3.8 ...decompilation off of 3.7ish rather than a 3.4
base.

Add more 3.7 and 3.8 tests
2019-12-08 17:54:59 -05:00
rocky
44f0ba0efb Add 3.0 try/except rule 2019-11-15 23:39:36 -05:00
rocky
0441fbc616 3.0.1 "ret_or", "ret_and", and "or" rules 2019-11-15 09:12:53 -05:00
rocky
7c8f3cc9ec Two 3.0 rules ...
- ifstmtlastl
- ifnotstmt30
2019-11-14 03:57:41 -05:00
rocky
d852f23962 3.3 "yield from" semantic action fix 2019-11-12 17:48:16 -05:00
rocky
9f250b49ee Cope more JUMP/POP_IF not being in 3.0...
more is probably needed though.
2019-11-11 19:58:35 -05:00
rocky
07ec8fa1fb More Python 3.0 custom "if" statment handling. 2019-11-10 18:44:43 -05:00
rocky
3f9a862277 Remove dup semantic rule 2019-07-05 06:24:14 -04:00
rocky
68c5b2338f Clearer 3.3 "yeild_from" semantic handling 2019-07-01 12:54:38 -04:00
x0ret
7b7f794913 Fix handling py3 annotation args + defparam comma issue 2019-07-01 01:28:32 +04:30
rocky
a1e7c16dbe Fix bugs introduced by last commit 2019-06-29 06:19:02 -04:00
rocky
35f14e4357 Small assert message change 2019-06-29 05:08:23 -04:00
rocky
0dc19a8fdd Correct 3.4 "yield from" semantic action bug 2019-06-29 04:59:03 -04:00
rocky
c8fc6a704c LOAD_CONST->LOAD_STR bugs and 3.4 kwargsonly 2019-06-09 02:18:21 -04:00
rocky
59b012df6f localize LOAD_STR change to Python 3 2019-06-08 11:01:58 -04:00
rocky
44d7cbcf6f LOAD_CONST->LOAD_STR for Python 3.x 2019-06-08 02:28:27 -04:00
rocky
d8f0d31475 better name for call generator rule 2019-06-06 02:53:04 -04:00
rocky
cb40caa73c DRY x0ret's code a little bit. 2019-06-05 20:35:06 -04:00
x0ret
fd59879510 feature #247: handle extra parenthesis in generators 2019-06-05 20:18:05 -04:00
rocky
3730946a1a Add semantic rule for 3.x "conditionalnot" 2019-04-22 21:18:17 -04:00
rocky
f1b69a8a28 Add rule for 3.x comp_for 2019-04-22 18:42:21 -04:00
rocky
8e11c53064 More cleanup from recent refactoring 2019-04-15 08:18:31 -04:00
rocky
b4c66d4307 Was missing some 3.7 and 3.7 semantic actions...
Possibly some as a result of the last refactor?
2019-04-15 08:11:31 -04:00
rocky
53968e535f Split up version-specific semantic action code more 2019-04-14 21:47:16 -04:00
rocky
d413ebe0e1 Split out semantic actions per version ...
In version 3.5..3.8 there are quite hefty changes.
2019-04-14 19:25:56 -04:00
rocky
f96522e18e Add 3.8 try else 2019-04-14 19:01:33 -04:00
rocky
c5cfd36a61 Start 3.8 async for/else 2019-04-14 06:54:08 -04:00
rocky
400943bb6a 3.8 async for/with...
More is needed though.
2019-04-13 22:22:37 -04:00
rocky
f89ba40147 Adjust while True grammar rule 2019-04-13 20:46:13 -04:00
rocky
32c611a315 Adjust 3.8 while-stmt rules 2019-04-13 20:35:26 -04:00
rocky
5d91e96358 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.
2019-04-13 18:31:40 -04:00
rocky
44edf1d7db 3.8 try/except handling - again (and more to come) 2019-04-12 03:20:13 -04:00