LuaDecompy/main.py
CPunch df8e9f7e83 refactoring: switched to match/case
wow! python actually added switch cases! too bad this is just syntax sugar...
2023-12-09 12:01:04 -06:00

15 lines
289 B
Python
Executable File

#!/usr/bin/env python3
import sys
import lundump
import lparser
lc = lundump.LuaUndump()
print(sys.argv[1])
chunk = lc.loadFile(sys.argv[1])
lc.print_dissassembly()
lp = lparser.LuaDecomp(chunk)
print("\n==== [[" + str(chunk.name) + "'s pseudo-code]] ====\n")
print(lp.getPseudoCode())