Add support for swap
bytecode and simple WITH_EXCEPT_START
bytecode support. (#488)
* Modify .gitignore * Added support for SWAP and WITH_EXCEPT_START, WITH_EXCEPT_START is simply added on top of SETUP_WITH_A so that it works properly. * Resolve the warning about comparing size_t and int. * Revert "Resolve the warning about comparing size_t and int." This reverts commit 54dfe36629855ca557277572d307dacaf6a64fe9. * Reapply "Resolve the warning about comparing size_t and int." This reverts commit d21d1681ed6496856ea65151e5fd798f0a718416. * Modify decompyle_test.sh * Modify .gitignore * Fix the logic error by placing the assignment inside the tuple * Re-adding test files * Fixing redundant brackets * Add support for swap bytecode and simple WITH_EXCEPT_START bytecode support. * Clean up some formatting issues --------- Co-authored-by: Michael Hansen <zrax0111@gmail.com>
This commit is contained in:
BIN
tests/compiled/swap.3.11.pyc
Normal file
BIN
tests/compiled/swap.3.11.pyc
Normal file
Binary file not shown.
12
tests/input/swap.py
Normal file
12
tests/input/swap.py
Normal file
@@ -0,0 +1,12 @@
|
||||
def SWAP():
|
||||
my_array = [
|
||||
1,
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
5,
|
||||
6,
|
||||
8]
|
||||
i = 1
|
||||
j = 3
|
||||
my_array[i], my_array[j], my_array[2] = my_array[j], my_array[i], my_array[4]
|
6
tests/tokenized/swap.txt
Normal file
6
tests/tokenized/swap.txt
Normal file
@@ -0,0 +1,6 @@
|
||||
def SWAP ( ) : <EOL>
|
||||
<INDENT>
|
||||
my_array = [ 1 , 2 , 3 , 4 , 5 , 6 , 8 ] <EOL>
|
||||
i = 1 <EOL>
|
||||
j = 3 <EOL>
|
||||
my_array [ i ] , my_array [ j ] , my_array [ 2 ] = my_array [ j ] , my_array [ i ] , my_array [ 4 ] <EOL>
|
Reference in New Issue
Block a user