Commit Graph

39 Commits

Author SHA1 Message Date
rocky
8542df4639 Add context manager test...
handle degenerate 3.8 withas
2024-03-07 18:08:07 -05:00
rocky
20af515dda Handle comprehensions inside a lambda 2023-08-11 12:13:46 -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
d1ef91dd49 Added tests for issue #439, global/const issues 2023-04-17 19:20:37 -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
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
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
96b1e435c2 Fixes #360 2021-06-15 22:42:55 -04:00
rocky
4365022f40 Adapt decompyle3's 3.8 try/return grammar rules 2020-05-17 10:18:10 -04:00
rocky
ced33a8f0b 3.8 "and" detection is failing. Works on decompyle3 though 2020-04-18 23:47:32 -04:00
rocky
e2baccb4e5 Reinstate 3.5 tests 2020-04-18 23:18:24 -04:00
rocky
538c2e7efd More regressions with some fixes 2020-04-17 00:06:39 -04:00
rocky
ea81ac7202 Reinstate previously failing tests 2020-04-16 17:16:38 -04:00
rocky
af8add9df4 Bug in finding annotation in fn with docstring 2020-03-31 11:13:12 -04:00
rocky
e4a196278a More control-flow testing based on past failures...
Some of these still cause problems. Sigh.
2020-02-02 06:08:19 -05:00
rocky
10695d882e Fix bug in 3.7 chained comparison semantic action 2020-01-24 06:14:28 -05:00
rocky
5c31fdc362 Fix bug in 3.6 handling kwonly params ...
when there are annotation args
2020-01-24 05:47:41 -05:00
rocky
5951f974d5 Fix 3.8 grammar rule bug: "for" with "if"/"return" 2020-01-23 06:07:34 -05:00
rocky
29715bb8bf 3.8 ifelsestmt grammar rule...
and remove optional "c_stmts" in 3.7 "ifelsesmt" rule. We may
have to come back and add something, but when we do we'll be more
careful and this is probably all for the better.
2020-01-22 22:50:27 -05:00
rocky
d2f59189dd Add missing code for n_assert_invert 2020-01-21 21:54:09 -05:00
rocky
6d368d2b30 parens around consts when taking attr again 2020-01-16 22:15:28 -05:00
rocky
73937ffeb4 Handle set/dictionary comprehensions in format strings 2020-01-13 23:49:17 -05:00
rocky
ec3a9978fc Better 3.6+ nested format strings 2020-01-13 19:08:54 -05:00
rocky
54f4806021 More fstring bugs -- nested fstring grammar rules 2020-01-13 08:04:53 -05:00
rocky
de282af05d Fix some fstring formats bugs...
* Need parens around a lambda in an format string.
* handle format string specifier + width

Note: other format-string bugs remain.
2020-01-13 06:40:18 -05:00
rocky
f56ad56021 Wacky string at beginning of fn which is not docstring...
3.7.6 test_fstring.py tests this.
2020-01-12 22:59:06 -05:00
rocky
c3d7ba6dad 3.7 "imports" and "or" 2020-01-11 07:23:23 -05:00
rocky
c42e16fafe Fix 3.7+ import as 2020-01-01 22:59:07 -05:00
rocky
6de57249ed Start 3.6+ var type annotations and decompyle3 merge...
Although overall an improvement, some new breakage
has occurred and should be fixed.
2020-01-01 01:42:00 -05:00
rocky
faf6ea9630 imports for 3.7+ again 2019-12-29 01:28:05 -05:00
rocky
b2e1edb434 Fix Python 3.7+ "import as" but keep "import from" working 2019-12-28 11:09:31 -05:00
rocky
79c38441b5 Better "assert" transformation. More 3.8 tests 2019-12-10 10:43:01 -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
2ea8c3b1b1 3.7 and 3.8 chained compare fixups 2019-04-16 10:19:16 -04:00
rocky
f3d86e0708 Bang on Python 3.8 2019-04-10 07:22:43 -04:00