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
R. Bernstein
9b5d953614
Merge pull request #364 from rocky/PYTHON3-move
...
use xdis.PYTHON3 not uncompyle.PYTHON3
2021-11-03 01:24:47 -04:00
Markus Elfring
05761b0d46
Issue #363 : Convert 14 statements to the usage of augmented assignments
...
Augmented assignment statements became available with Python 2.
https://docs.python.org/3/whatsnew/2.0.html#augmented-assignment
Thus adjust 14 source code places accordingly.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net >
2021-11-02 11:25:04 +01:00
rocky
96b1e435c2
Fixes #360
2021-06-15 22:42:55 -04:00
Tim Gates
fc38e23d8f
docs: fix simple typo, unecessary -> unnecessary
...
There is a small typo in test/simple_source/looping/12_if_while_true_pass.py.
Should read `unnecessary` rather than `unecessary`.
2020-12-31 18:11:41 +11:00
rocky
8879708da7
del_stmt -> delete to match Python AST better
2020-09-02 07:14:56 -04:00
rocky
a215ee2f00
Use "co_consts" in docstring detection.
...
Note: this is an upheaval because we need to pass "code" or at least
"code.co_consts" to the docstring detection routine
2020-07-21 10:31:07 -04:00
rocky
0f80c38530
Better doc string detection
...
A bug in 2.7 test_descr.py revealed a problem with the way we were
detecting docstrings.
__doc__ = DocDescr()
was getting confused with a docstring.
This program also reveals other bugs in 3.2+ but we'll deal with that
in another commit.
2020-07-19 20:31:50 -04:00
rocky
54932d36fa
Small tweaks...
...
add-test.py: wasn't handling optimize correctly. Handle python version better
parse27.py: dyslexia
01_for_else_try_else.py: bug in found in 1.4 anydbm.py which we will
address soon
2020-07-06 18:19:06 -04:00
rocky
e14675c2dc
Handle 3.7+ "else" branch removal...
...
As seen in _cmp() of python3.8/distutils/version.py with optimization -O2
2020-06-12 13:18:33 -04:00
rocky
acdd025162
ast-check "for" is a loop; sync "withas" test ..
...
with decompyle3.
2020-06-04 05:34:19 -04:00
rocky
9acb3cf068
Fix bug in 3.8 with .. as
2020-06-04 05:24:22 -04:00
rocky
d343384db7
A runnable "async" and "async with" test
2020-05-16 07:55:51 -04:00
rocky
d3cf87e2d9
Start marking test suite since this is going to be copied
2020-05-04 11:43:16 -04:00
rocky
c5228dbdc4
Small test doc typo
2020-05-01 23:19:31 -04:00
rocky
5c6365d8a1
Go over "yield" and other precedence
2020-04-09 20:27:07 -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
af8add9df4
Bug in finding annotation in fn with docstring
2020-03-31 11:13:12 -04:00
rocky
28ef04d141
More bugs found via sre_parse.py decompilation
2020-02-15 05:10:11 -05:00
rocky
fd36c77d2d
Bugs found in 2.4 branch testing
2020-02-14 10:54:37 -05:00
rocky
874d196e5c
3.x ifelsestmtc reduction rule fix
2020-02-13 05:41:15 -05:00
rocky
6cbb631aa6
In lambda code we, no stinking bogus yield
2020-02-09 07:32:06 -05:00
rocky
8495d208fb
3.7+ "async with" handling from decompyle3
2020-02-08 19:48:09 -05:00
rocky
cb35ad906c
One more if_exp use (ret_cond)
2020-02-07 16:34:48 -05:00
rocky
278af38df6
conditional -> if_exp ...
...
to match Python IfExp AST
2020-02-07 16:17:47 -05:00
rocky
7fb50918cd
Bug in "async for" indentation
2020-02-06 23:54:03 -05:00
rocky
3438e76865
"return locals()" change to track grammar change
2020-02-06 20:08:00 -05:00
rocky
04f8619cf1
Better docstring recognition
2020-02-02 13:02:37 -05: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
16a51961c3
Add tests based on recent runtests.sh failures...
...
These run quicker and are distilled to simple examples.
2020-02-01 20:32:23 -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
31481de209
Test for previous commit
2020-01-22 19:24:29 -05:00
rocky
018583069b
3.7+ bug in handling extended arg
2020-01-22 14:31:45 -05:00
rocky
bc50825460
Conditional jumps to extended-arg JUMP_BACK...
...
this is a major reworking. But it leads the way forward to a
simpler grammar.
2020-01-22 05:32:27 -05:00