54 Commits

Author SHA1 Message Date
rocky
51141ad06d Use set literals 2024-06-03 07:55:44 -04:00
rocky
156188f8bb withasstmt -> with_as
This matches Python's AST naamae better. Some linting and
sorting of dictionary keys done as well.
2024-03-08 04:10:33 -05:00
rocky
08009f9fc7 improve list comprehensions 2024-02-25 08:19:18 -05:00
rocky
dcc9d1a571 Fix spelling via "codespell" 2023-12-17 10:52:32 -05:00
rocky
41d1ba31f3 Synch with decompyle3 code a little bit 2023-01-19 04:31:19 -05:00
rocky
7c99564640 Reinstate pos_args in CALL_METHOD 2023-01-18 21:01:11 -05:00
rocky
2264ccb1d5 A partial reduce-action sync with decompyle3
Start us add _check prefixes and _invalid to the end of check methods
2022-09-30 02:45:52 -04:00
rocky
cca015c5d6 Use LOAD_ARG in 3.6 2022-05-06 12:53:55 -04:00
rocky
f5043408ec Start rolling in LOAD_ARG for 3.7+ 2022-05-06 02:41:02 -04:00
rocky
371138cfbc handle long literal constants faster 2022-04-24 13:11:20 -04:00
rocky
c88d9de316 Correct 3.7 "impor"t and "from .. import" 2022-04-20 20:03:28 -04:00
rocky
83ab85353b Remove a reference to an unset local variable
See also https://github.com/rocky/python-uncompyle6/pull/388
2022-04-09 02:29:44 -04:00
rocky
219cb0606a MAKE_FUNCTION_8 -> MAKE_FUNCTION_CLOSURE
Clarity is important.
2022-02-27 10:29:53 -05:00
rocky
5b5fa310d9 Partial 3.8 async "for" fixes 2022-01-18 13:08:17 -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
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
165115289a dict_unmap -> dict_unpack matches Python AST better 2021-12-26 19:03:58 -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
23551ea70f unmap_dict -> dict_doublestar ...
This matches Python's AST (Dict) better. Variations or specializations
of an AST name, e.g. "unmap" should come at the end, not the beginning.
2021-12-23 22:57:15 -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
rocky
41314f95bb More Python version comparison adjustments 2021-10-19 16:30:56 -04:00
rocky
15efaffe8d More Python version tuple comparison conversion 2021-10-16 11:41:22 -04:00
rocky
8879708da7 del_stmt -> delete to match Python AST better 2020-09-02 07:14:56 -04:00
rocky
9acb3cf068 Fix bug in 3.8 with .. as 2020-06-04 05:24:22 -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
5bd97aa756 lint 2020-04-21 13:49:05 -04:00
rocky
badfe5456f Track "or" grammar changes...
Remove re deprecation warning
2020-04-16 15:25:42 -04:00
rocky
ceb26d29fd 3.5- doesn't do format strings 2020-04-01 10:03:10 -04:00
rocky
a616e1e1c7 "withstmt" -> "with" and fix async for 2020-04-01 09:48:34 -04:00
rocky
e2d349f781 Handle nested async for in for...
and Better async comprehension detection.

Still more work is needed. See commented-out section in
test/simple_source/bug37/02_async_for_generator.py
2020-03-31 12:05:39 -04:00
rocky
2b2e7d3242 Bump xdis and pyenv versions, 2020-03-16 16:44:34 -04:00
rocky
8495d208fb 3.7+ "async with" handling from decompyle3 2020-02-08 19:48:09 -05:00
rocky
e2504c2421 3.7 ifelstmtl reduction rule checking 2020-02-08 13:47:05 -05:00
rocky
278af38df6 conditional -> if_exp ...
to match Python IfExp AST
2020-02-07 16:17:47 -05:00
rocky
eeb48818f3 Largish rework: scan while1stmt for jump out ..
to disambiguate.

For this, we use the self.opc JUMP_OPS sets.
For this, we neeed to store opc in the parse object.

DRY uses of "last = min(last, len(tokens))
2020-01-23 13:02:29 -05:00
rocky
5f230fa177 Add 3.7 "testfalsel" for looping conditions 2020-01-14 18:41:39 -05:00
rocky
b84c89e817 Bang on getting 3.x "try" vs "try/else" disambiguated 2020-01-11 22:36:07 -05:00
rocky
eba8f04e29 DRY reducecheck code 2020-01-10 15:36:24 -05:00
rocky
505946d747 Add "testtrue" reduction rule...
only for 3.7 for now.
2020-01-10 10:26:40 -05:00
rocky
5fc54015e4 3.7+ or reduction rule again 2020-01-09 04:32:15 -05:00
rocky
199fb532bf Move code from parse37base to reducechecks 2020-01-08 22:24:41 -05:00
rocky
6f6ef19e0a Start splitting out reduction checks 2020-01-08 20:25:59 -05:00
rocky
7bd81efe9b 3.7+ "from import" vs "import as" disambiguation 2020-01-02 09:43:37 -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
868721595d Fix grammar rule for "expr GET_ITER" in 3.1+ 2019-12-23 11:52:27 -05:00
rocky
8f4343ef22 Fix bug 3.5+ in handling nested decorators 2019-12-21 22:57:59 -05:00
rocky
28d9e66a53 Redo the way we handle complex literals and 3.7+ bug fixes...
In 3.7+ remove assert_expr* parser rules
Fix "call" precidence in 3.7+ for it children
2019-12-19 06:40:13 -05:00
rocky
d39169dbda Add 3.7 async listcomp 2019-12-16 00:14:16 -05:00
rocky
af9f6b05fa Add 3.7 "async for" in generator 2019-12-15 21:18:37 -05:00