Commit Graph

76 Commits

Author SHA1 Message Date
x0ret
eae3f0d77b Fix issue in commas in function signatures 2019-06-10 02:25:19 +04:30
x0ret
a54fba7993 Fix issue in commas in function signatures 2019-06-10 01:42:16 +04:30
x0ret
e82cabc278 Fix 2 issues in commas in function signatures 2019-06-10 00:29:34 +04:30
x0ret
4022e80d6d Fix py3 function signatures + annotations + ordering 2019-06-09 23:46:33 +04:30
x0ret
2f99da8199 Fix leading * arg in function signature in 3.6 2019-06-09 19:06:57 +04:30
rocky
c8fc6a704c LOAD_CONST->LOAD_STR bugs and 3.4 kwargsonly 2019-06-09 02:18:21 -04:00
x0ret
48ae7a6964 Fix kwonly args annotation handling 2019-06-09 01:38:42 +04:30
x0ret
e9002038f8 Revise annotation type implementation for < 3.6 2019-06-08 20:42:43 +04:30
x0ret
c7b20edba0 add annotations type test cases 2019-06-06 19:14:03 +04:30
rocky
afa6a00db8 x0ret's code in decompile3 for annotation types 2019-06-06 06:39:02 -04:00
rocky
8663b4ca52 Fix bugs caused by last commit 2019-04-18 07:31:16 -04:00
rocky
b2dd58a85e Hacky attemp to add more 3.x annotate information in 2019-04-18 02:26:50 -04:00
rocky
43646b3c71 Comma placement in 3.6 and 3.7 **kwargs
fixes #208
2019-01-14 17:41:54 -05:00
rocky
19ec52eb63 Change AST to SyntaxTree in many places 2018-07-15 12:37:50 -04:00
rocky
3ac4f1ee61 Had botched parameter order in 3.x. Sigh 2018-06-13 11:29:57 -04:00
rocky
e3d918df3d Allow Python 3.0 and fix default param bug in 3.0 2018-06-11 11:33:50 -04:00
rocky
e7b62a722f Fix more Python 3.0 parse bugs 2018-06-10 16:49:04 -04:00
rocky
189605ea2c Adjust showtree() calls 2018-05-13 14:23:52 -04:00
rocky
5de8a33286 codeNode->code_node 2018-04-13 15:44:41 -04:00
rocky
61e2b3b635 Can run on 3.1. Fix some 3.1 function-call bugs 2018-04-08 04:11:01 -04:00
rocky
30ce3a8bea Small tweaks 2018-04-04 22:36:26 -04:00
rocky
ca41ea99f2 Fix 3.2 to 3.3 make_function more properly 2018-04-04 14:30:34 -04:00
rocky
e3040c78a9 3.2-3.4 Functions cals/defininitions yet again
And we're still not out of the woods.
2018-04-03 21:27:31 -04:00
rocky
e9c0d03b8b 3.2 mk_func tweak...
...more is needed though
2018-04-03 17:57:37 -04:00
rocky
120412f5a8 Add Python 3.6 setcomp and another call bug 2018-04-01 07:09:24 -04:00
rocky
9be4908c9c Python 3.6 MAKE_FUNCTION yet again...
And we'll eventually have to do more down the line
2018-03-29 22:04:46 -04:00
rocky
7d110f17bc 3.6 decompilation problems 2018-03-29 17:21:22 -04:00
rocky
35a60e0274 Fix parser slowness in decompiling 3.x locale.py..
And remove grammar inefficiency in adding extraneous kwargs in <= 3.2
kwargs was nullable so it might not have been wasn't wrong, just inefficient.
2018-03-23 11:59:04 -04:00
rocky
5c662b334e Handle 3.x "nonlocal" statement 2018-03-19 07:57:25 -04:00
rocky
def9e1676b look for "closure" node from the end...
Fix previous commit. Looking from the beginning fails because there are
a variable number of default values. From the end though seems fixed.
2018-03-04 19:28:51 -05:00
rocky
35fcb1edf1 Picking out 3.3 function default values 2018-03-04 18:40:08 -05:00
rocky
a8260edded 3.6 function/class prototype fixes..
Had got the order backwards in: class Foo(a=B.c)
String defaults in default parameter tuples need to be quoted
2018-03-03 09:12:02 -05:00
rocky
bb13988126 Instruction fixup broken 3.x make_func...
for handling default values
2018-03-02 08:03:51 -05:00
rocky
2edc757b6f more deparse_code -> code_deparse API additions 2018-03-01 16:55:45 -05:00
rocky
f7439f506a Fix 3.6 MAKE_FUNCTION for kw params...
and remove duplicated attributies in pattr of MAKE_FUNCITON token.
2018-03-01 07:14:46 -05:00
rocky
413df51dfa Token.format(), shows CONST values better...
We were not showing the proper value for None, or False.

Start a unit test for Token().

I think this cleans the Token class up a little more.

More work is needed for MAKE_FUNCTION...

Note: Some debug stuff is commented out in make_funciton.py for upcoming work.
2018-02-28 22:05:12 -05:00
rocky
5c2d0484e5 3.6 MAKE_FUNCTION workarounds
Still wrong, but points to diretions for improvements
2018-02-26 09:10:00 -05:00
Yiming Wang
3545c7dc6f Keep global statements in fixed order 2018-02-24 22:22:50 +08:00
rocky
09efb24a3e Start distinguishing AST from grammar tree 2018-02-22 11:17:09 -05:00
rocky
bcf437deda 3.x bug in adding extra , in **kargs 2018-01-29 12:03:15 -05:00
rocky
a9df4e3a54 Fix 3.0 .. 3.2 kwargs bug 2018-01-29 09:40:38 -05:00
rocky
3b0eb017b6 Bang on Python 3.6 MAKE_FUNCTION 2017-12-15 07:35:58 -05:00
rocky
c5b8531ef1 Fix last-minute bug due to kwargs->kwargs1 2017-12-10 18:00:44 -05:00
rocky
bbaa3e6602 Fix bug in single param **arg 2017-12-05 07:50:22 -05:00
rocky
2d628acf60 Separate rules for set, tuple, dict from list...
Sync fragments.py with pysource
2017-12-05 00:13:17 -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
5ae32de709 Add global statements even for read of globals 2017-12-02 19:13:11 -05:00
rocky
dad1b4780c Fix bugs in 3.6 default parameter handling
Mentioned in Issue #139
2017-12-01 20:12:06 -05:00
rocky
af38064a1b remove unpack_list rule and ...
tidy things a bit more
2017-11-25 00:32:13 -05:00
rocky
0c386d2c39 Fix bug where lambda has a yield in it 2017-11-24 08:55:26 -05:00