Commit Graph

182 Commits

Author SHA1 Message Date
rocky
dcc9d1a571 Fix spelling via "codespell" 2023-12-17 10:52:32 -05:00
rocky
3a178836a6 Fix a small default-value bug 2023-07-29 13:00:21 -04:00
rocky
d6608712f1 correct fn name on older 3.x cross decompile...
Also black, lint, and isort some
2023-06-30 20:30:06 -04:00
rocky
828b1c989d Fix fragment bugs
mostly with respect to show_ast handling
2023-06-29 15:56:53 -04:00
rocky
d366248b47 Some small variable-name changes 2022-03-04 04:47:38 -05:00
rocky
88c0c03ee4 setcomprehension_walk3 -> closure_walk 2022-01-14 07:50:39 -05:00
rocky
deea74b6a8 ret_expr -> return_expr
This matches Python's AST a little more closely
2022-01-03 21:56:07 -05:00
rocky
16c900ff1d Propagate show_asm debug option down to functions 2021-12-17 06:07:18 -05:00
rocky
51ac72ba1f Sync with decompile3 2021-10-24 01:52:23 -04:00
rocky
d5bf7626af Fix bug in fragment parser 2021-10-24 01:32:41 -04:00
rocky
71fe1e6c2c Fragment and other bugs
Part of the upgrade process
2021-10-23 09:47:30 -04:00
rocky
f374485e93 Another fragment fix for 3.8 2021-07-29 14:23:17 -04:00
rocky
fe7df87288 Sync 3.8 and Makefile changes with decompyle3
Makefile: pyston 2.3 tolerance
fragments: 3.8 comprehension adjustments
2021-07-29 13:16:03 -04:00
rocky
8eb4d6a576 Fix bit rot in fragments.py
build_ast() added a code argument
n_dict(): was out of sync with corresponding pysource routine
pysource.py: small doc typo
2020-09-04 19:30:48 -04:00
rocky
8879708da7 del_stmt -> delete to match Python AST better 2020-09-02 07:14:56 -04:00
rocky
71c17c4e53 Fragment api changed...
sync with pysource.
Simplify pysource a little
2020-08-23 19:27:52 -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
3fb8d90407 Revise for xdis 3.6.0 ...
Simplify xdis imports where we can.
Blacken (most) of those buffers too
2020-05-18 21:49:16 -04:00
rocky
3e1300eb23 Bugs in nested async for...
* Generalize asyc_for rule
 Fix bug in picking out comprehension iterator in async for
* fix bug in getting expression in such a comprehension
* Add %[n]{%x} pattern to template_engine()
2020-04-29 10:12:54 -04:00
rocky
ab6b12be56 Small fixes in fragment parser 2020-04-21 19:58:03 -04:00
rocky
869e48877c Convert to use xdis 4.3.0 or greater 2020-04-16 08:41:53 -04:00
rocky
cc55fa1de1 binary_expr -> bin_op to match Python AST
I know binary_expr is more natural, but as with things Python we
sometimes sacrifice elegance and clarity for Python Fascism.
2019-12-11 13:35:21 -05:00
rocky
d21d93fd84 Handle 3.0 call_stmt better 2019-11-16 15:21:59 -05:00
rocky
0a5fcc51d8 Pypy 3.6 fixes and tests 2019-10-29 11:43:09 -04:00
rocky
d41ef3e5dc Pypy 3.6 tolerance 2019-10-28 14:46:45 -04:00
rocky
5cb46c2ed3 Better simpler fragment fix...
remove hide_internal test. We changed the default and that's what
whas causing RETURN_LAST to not get included.
2019-10-12 17:55:52 -04:00
rocky
163e47fb49 Fragment fixes (and workarounds)
fragments.py: add more parent offsets. blacken buffer
parser3.py: additional grammar rules for fragment parser

Misc small typos and corrections
2019-10-12 12:22:27 -04:00
rocky
5ad51707e3 Wasn't handling 3-arg %p in fragments.py...
and also fielding errors in code_deparse()
2019-10-02 10:29:49 -04:00
rocky
44d7cbcf6f LOAD_CONST->LOAD_STR for Python 3.x 2019-06-08 02:28:27 -04:00
rocky
9b550b9dda PEP E225 with a nod to Deepcommit 2019-04-14 06:11:16 -04:00
rocky
f5448b371c More complete fragment parsing for imports 2018-12-10 06:40:14 -05:00
rocky
19ec52eb63 Change AST to SyntaxTree in many places 2018-07-15 12:37:50 -04:00
rocky
189605ea2c Adjust showtree() calls 2018-05-13 14:23:52 -04:00
rocky
e76f1f107f Better testing of named %c format specifiers 2018-05-08 08:49:43 -04:00
rocky
9ef38285f4 Fix bug in fragment parser 2018-04-14 06:54:15 -04:00
rocky
5de8a33286 codeNode->code_node 2018-04-13 15:44:41 -04:00
rocky
c81b40b43b Comment out test/demo code 2018-03-21 20:00:25 -04:00
rocky
d41a858f80 Messed up API compatibility 2018-03-21 17:38:38 -04:00
rocky
85a49aec2f Work on fragments API...
* Add code_deparse_around_offset
* find_globals -> find_globals_and_nonlocals
2018-03-20 13:43:16 -04:00
rocky
61534ceed5 Need to back off set_comp change a little...
There was set_comp already. So what had been setcomp_func is now
merely set_comp_func rather than set_comp. Small improvement but
in the right direction, still
2018-03-05 11:41:21 -05:00
rocky
9f66694056 dictcomp_func -> dict_comp_func...
to match AST better. Also adds a correction in last commit,
including set_comp -> set_comp_expr where apprpriate

Note: can't use dict_comp as that was already used.
But dict_comp_func is matches AST better than dictcomp_func
2018-03-05 11:12:15 -05:00
rocky
2bdfd76635 setcomp_func -> set_comp ...
to match AST name more closely
2018-03-05 10:20:14 -05:00
rocky
b6d96929cb Start simplifying higher-level API 2018-02-27 17:48:26 -05:00
rocky
68692abaf6 Start changing API to make version optional...
and use debug option dictionary
2018-02-27 11:42:29 -05:00
Yiming Wang
3545c7dc6f Keep global statements in fixed order 2018-02-24 22:22:50 +08:00
rocky
a2b6ebc669 grammar tree -> parse tree 2018-02-22 14:34:42 -05:00
rocky
09efb24a3e Start distinguishing AST from grammar tree 2018-02-22 11:17:09 -05:00
rocky
fa4f614295 Wierd comprehension bug seen via new loctraceback 2018-02-15 12:15:49 -05:00
rocky
083ae5f3fd Add deparsed_find() used by the trepan debuggers 2018-02-15 10:42:00 -05:00
rocky
ca2c06ca87 Small cleanups 2018-02-03 11:43:00 -05:00