587 Commits

Author SHA1 Message Date
gdesmar
7db6a272af
Adding tests for bytestring docstring 2024-10-16 20:19:39 +00:00
rocky
04da2fb8df Improve 3.4 ifelse inside a lambda
Fixes #426
2024-07-13 22:46:31 -04:00
rocky
389fc2360a 3.6 bug related to large whilestmt 2024-07-13 21:42:49 -04:00
rocky
7787166ddf Add grammar rule involving RETURN_END_IF 2024-07-13 17:47:21 -04:00
rocky
e3579463ab Loosen what is allowed in whilestmt38...
Fixes #498
2024-07-13 11:58:27 -04:00
rocky
f030b3316c Fix some 2.5 parsing bugs 2024-07-12 11:21:48 -04:00
rocky
4394d46f64 Remove redundant list_comp() fn 2024-07-11 20:16:03 -04:00
rocky
6fe8a1d2ba Address long-standing Python 2.6 try/except bug
Fixes #405
2024-07-11 14:01:50 -04:00
rocky
3c6e378cc4 Spelling corrections 2024-07-10 13:31:39 -04:00
rocky
8542df4639 Add context manager test...
handle degenerate 3.8 withas
2024-03-07 18:08:07 -05:00
Jakub Wilk
7a2348e4cc Fix typos 2024-01-19 23:20:13 +01:00
rocky
20af515dda Handle comprehensions inside a lambda 2023-08-11 12:13:46 -04:00
rocky
ddeb5af6d6 compare_chained2 _> compare_chained_right 2023-07-29 12:09:25 -04:00
rocky
c01ab5e001 Tweaks to long-literal handling...
* Use version tuple comparison for version testing
* small lintin of n_actions
* revise test so assert is not removed in 3.8
2023-04-19 02:08:36 -04:00
Andre Eberle
4d420e2e37 Typo in comments 2023-04-17 19:26:35 -04:00
Andre Eberle
d1ef91dd49 Added tests for issue #439, global/const issues 2023-04-17 19:20:37 -04:00
rocky
ad00b9a4ee Use xdis pattr extraction for LOAD_NAME 2023-04-15 07:31:35 -04:00
rocky
154dabfcef Handle Python 3.4 MAKE_CLOSURE fns ...
Is done just like Python 3.3
2023-01-14 09:54:48 -05:00
rocky
5b3ea47bac Correct long-literals for Python 2.7 2022-10-16 19:33:51 -04:00
rocky
bb9b9fb4b3 Improve "if/else" in "for" test 2022-10-16 18:24:48 -04:00
Berbe
512c500810
Add: Tests: CONTINUE in else block in a for loop 2022-10-10 20:33:19 +02:00
rocky
600688a65d Sync with decompyle3 2022-09-17 10:54:09 -04:00
rocky
4260deea11 Tidy ifelsemstmt check 2022-08-29 05:46:46 -04:00
R. Bernstein
200250df56
Merge pull request #406 from tangboxuan/master
Fix offset of extended argument instruction
2022-08-24 05:51:41 -04:00
Bo Xuan
2f3b5e53d4
Add test case 2022-08-24 16:19:39 +08:00
rocky
21b4d52a77 Correct 2.6 erroneous ifelse detection 2022-08-23 16:50:50 -04:00
rocky
5a4136a7f6 Some limited support for 3.8 "=" specifier 2022-07-06 13:00:52 -04:00
rocky
85ba8352ba Port over some recent decompyle3 3.8 fixes 2022-06-26 04:26:15 -04:00
rocky
7f798541f0 Python 3.8 while and whileTrue loops 2022-06-16 15:42:51 -04:00
rocky
fa9cc4c669 Correct 2.5-7 relative import formatting 2022-05-14 19:35:24 -04:00
rocky
9b80663529 3.6 async hacking 2022-05-07 07:01:39 -04:00
rocky
8576117d00 Fix More 3.6 async parsing
... all from 3.6 test_coroutines.py.

More bugs remain
2022-05-05 07:36:06 -04:00
rocky
eba0d37d0f Improve Python 1.x decompiling
Still has bugs, but is much better.
2022-04-30 05:54:22 -04:00
rocky
37ea469ce6 One more 2.4 test 2022-04-28 17:11:17 -04:00
rocky
e564ac3ab1 Go over long-literal test 2022-04-24 17:50:32 -04:00
rocky
8cdf741b62 Bugs in long-literal handlin
Move n_dict to n_actions and special case n_const_list.
Generalize build_collection out of 3.7+ and into all Pythons
2022-04-24 17:38:35 -04:00
rocky
371138cfbc handle long literal constants faster 2022-04-24 13:11:20 -04:00
rocky
f3ac70d0ea test tweak again 2022-04-21 05:34:15 -04:00
rocky
c88d9de316 Correct 3.7 "impor"t and "from .. import" 2022-04-20 20:03:28 -04:00
rocky
04510ac2f8 lambda formatting in f-string
In a formatted string using "lambda',  we should not add "\n".
For example in:
  f'{(lambda x:x)("8")!r}'

Adding a "\n" after "lambda x: x" will give an error message:
  SyntaxError: f-string expression part cannot include a backslash
2022-04-12 16:49:58 -04:00
rocky
a1fe069c8c Handle walrus operator
Or rather set precedence on call_stmt and expr_stmt

Adjust pytest test_single_compile so it works now
2022-04-12 05:21:13 -04:00
rocky
bc71bf7acd Shorten 10_complex.py
Runtime testing took too long because ranges were larger than needed
Also use newer convention for marking runable codes
2022-04-03 06:41:58 -04:00
rocky
219cb0606a MAKE_FUNCTION_8 -> MAKE_FUNCTION_CLOSURE
Clarity is important.
2022-02-27 10:29:53 -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
203139eafa Add tests, comment what's up with change..
and use isinstance()
2021-12-31 11:27:15 -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
da2314f5ae Part of the decompye3 loop "continue" fixes 2021-12-17 16:13:09 -05:00
rocky
2d5249f1d3 Small comment change 2021-11-23 07:31:37 -05:00
rocky
211c74c240 Better 3.7 CALL_METHOD_KW handling
- Handles positional args now
2021-11-23 05:06:48 -05:00
rocky
2ed211e0d4 Some PyPY 3.7 support
* Handle CALL_METHOD_KW
* adjust PyPY 3.7 assert stmts
* misc administrivia
2021-11-21 14:04:34 -05:00