diff options
author | Alex Xu <alex_y_xu@yahoo.ca> | 2013-07-23 17:25:54 -0400 |
---|---|---|
committer | Alex Xu <alex_y_xu@yahoo.ca> | 2013-07-23 17:25:54 -0400 |
commit | 8e883a46948e25787ecb01c0fceeee0d2e252521 (patch) | |
tree | f3790a93a548ee3ab1555b63b289d64cc2d033cd /unrpyc/decompiler.py | |
parent | 5366753037dfbbc242fe974cf2f2b8ba4499ac2b (diff) | |
download | html5ks-8e883a46948e25787ecb01c0fceeee0d2e252521.tar.xz html5ks-8e883a46948e25787ecb01c0fceeee0d2e252521.zip |
working, fixing bugs...
Diffstat (limited to 'unrpyc/decompiler.py')
-rw-r--r-- | unrpyc/decompiler.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/unrpyc/decompiler.py b/unrpyc/decompiler.py index c6046f6..64d0e4c 100644 --- a/unrpyc/decompiler.py +++ b/unrpyc/decompiler.py @@ -21,6 +21,7 @@ import ast as python_ast import renpy.ast as ast import renpy.atl as atl +import code DECOMPILE_SCREENS = False firstLabel = True @@ -176,7 +177,7 @@ def print_imspec(f, imspec): # at if len(imspec[3]) > 0: - f.write(' at ') + f.write('", "') delim = '' for s in imspec[3]: f.write(delim + escape_string(s)) @@ -275,6 +276,8 @@ class PrintRenPython(python_ast.NodeVisitor): self.f.write(self.visit(node.func)) self.f.write(', ') self.f.write(', '.join(map(self.visit, node.args))) + self.f.write(', ') + self.f.write(', '.join(map(self.visit, node.keywords))) self.f.write('],\n') def quote(self, string): @@ -292,6 +295,9 @@ class PrintRenPython(python_ast.NodeVisitor): def visit_Str(self, node): return self.quote(escape_string(node.s)) + def visit_keyword(self, node): + return self.visit(node.value) + def print_Python(f, stmt, indent_level, early=False): code_src = stmt.code.source |