rocky
dcc9d1a571
Fix spelling via "codespell"
2023-12-17 10:52:32 -05:00
rocky
f8ae674890
Split out comprehension code..
...
sync with decompile a little better
2022-04-17 10:52:56 -04:00
rocky
3d5b6f4654
return_lambda -> return_expr_lambda
...
Except those places in 2.6ish code where it is simple a fancy RETURN_VALUE
2022-01-01 21:45:51 -05:00
rocky
3234673422
mklambda -> lambda_body matches Python AST better
...
Note: we can't use "lambda" since that is a reserved word
2021-12-26 18:48:51 -05:00
rocky
8094f3bb12
Remove PYTHON3
2021-11-03 03:00:43 -04:00
rocky
f6f0e344d0
Python 3.6+ specialization
2021-11-03 02:23:19 -04:00
rocky
ed34bf9d4a
use xdis.PYTHON3 not uncompyle.PYTHON3
2021-11-02 06:53:11 -04:00
rocky
8ac7a75372
Use tuples not floats in Python release comparison
2021-10-18 11:59:02 -04:00
rocky
c68b74a9c6
new dis - Python compisons involving tuples
2021-10-15 23:39:59 -04:00
rocky
869e48877c
Convert to use xdis 4.3.0 or greater
2020-04-16 08:41:53 -04:00
rocky
278af38df6
conditional -> if_exp ...
...
to match Python IfExp AST
2020-02-07 16:17:47 -05:00
rocky
db2fdb30fd
Tidy code.
...
* Don't use "str" as a variable name
* blacken helper and alphabetically order fns
* use helper function `find_code_node()` in transform `mk_func()`
2019-12-27 12:38:09 -05:00
rocky
37301ab49e
Was dropping docstrings! Add in decompyle make_function36
2019-12-27 11:41:03 -05: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
39c12704a8
fix unicode docstring again, handling unicode string in py2, fix docstring indentation
2019-05-28 15:11:44 +04:30
rocky
f7697ccd7b
Some docstring bugs fixed, some remain...
...
I had broken escaping the tail quote by inadvertently switching from """
by default to '''.
Some additional tests have been added to 00_docstring.py for
this. However...
Unicode decoding is still broken. For now I've added errors="ignore" to
.decode("utf-8", ...) until a better fix is found. Sigh.
2019-05-27 18:01:08 -04:00
x0ret
a5cdb50154
towards supporting unicode: docstring
2019-05-27 17:00:08 +04:30
rocky
792ef5b5b8
Simplfy - TODO fix unicode in docstrings
2019-05-24 11:03:44 -04:00
rocky
47ed0795b2
3.x docsting escaping works differently?
2019-05-24 09:53:56 -04:00
rocky
8909fe8d37
Merge branch 'master' of github.com:rocky/python-uncompyle6
2019-05-08 06:04:11 -04:00
rocky
733a44e22f
Revise and hopefully improve 3.6+ fstring handling
2019-05-08 06:03:39 -04:00
rocky
f2f17740ee
2.7 if_expr_true restriction ...
...
condition_true -> if_expr_true
condition_lambda -> if_expr_lambda
These correspond to the Python AST names better.
2019-05-05 16:09:10 -04:00
rocky
616e5c82f6
Reinstat expr32 and expr1024 rules...
...
to speed up handling long literal lists. See also issue #188
Update issue forms to simplfy via putting instructions as comments.
2018-09-19 20:14:42 -04:00
rocky
19ec52eb63
Change AST to SyntaxTree in many places
2018-07-15 12:37:50 -04:00
rocky
f008b8f411
Two 3.4 fixes..
...
* LOAD_DEREF does not signal "nonlocal" variables
* Add rule for "if" with a "continue" and "return"
2018-03-20 05:07:19 -04:00
rocky
5c662b334e
Handle 3.x "nonlocal" statement
2018-03-19 07:57:25 -04: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
b84c35acf5
DRY code; localize 3.{5,6} grammar rules..
...
helper.py, pysource: has code to flatten list used in n_list and n_build_tuple_unpack_with_call
parse3{5,6}.py: localize grammar rules with BEFORE_ASYNC_WITH
2017-12-11 21:26:58 -05:00
rocky
5fe8303184
Two bugs and a refactor ..
...
1. parse2.py: try except in a loop with a (virtual) continue
treat CONTINUE like JUMP_ABSOLUTE which it is
2. in taking methods off of constants, a parenthesis needs to be added
Some refactoring of global code done
2017-12-03 10:46:22 -05:00
rocky
e172a8f3c0
Fix docstring bug..
...
small sync with python 2.4 branch
2017-12-02 21:11:19 -05:00
rocky
abecb21671
2.7 grammar bug workaround. Fix docstring bug
2016-11-24 21:57:39 -05:00
rocky
c8550d5c9e
Split out print_docstring
...
move from pysource.py to new helper.py
2016-11-22 05:29:50 -05:00