Open ghost opened 4 years ago
This has been addressed by https://github.com/rocky/python-decompile3/commit/a34740ad9b7f20d6bcf58234e1611240e14ecdfb however the change there needs to be applied here. I'm hoping someone else will put in a PR for that.
Handling on 3.8 will need additional work.
while True:
pass
also this is not work. without inside function or if-else
while True:
pass
is a little bit silly,
2: >> 0 JUMP_ABSOLUTE (to 0)
but if one wanted to handle that, you could probably write a parse custom rule for this.
It's not something though that I feel particularly motivated to work on. However should I need to do so in the future, maybe this will serve as a reminder for what approach to take.
I was trying to decompile a pyc that I had, but it had a few errors. I managed to manually decompile it though and narrowed it down to code that looks like this:
When I compile this with
python3 -m compileall .
and then attempt to decompile, I get a 'parse error':Here is the disassembly of that code:
Hopefully this issue can be fixed!