Skip to content

Commit 9af9505

Browse files
committed
Correct showgrammar option handling
1 parent 0bca624 commit 9af9505

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

decompyle3/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def decompile(
6767
showasm: Optional[str] = None,
6868
showast={},
6969
timestamp=None,
70-
showgrammar=False,
70+
showgrammar={},
7171
source_encoding=None,
7272
code_objects={},
7373
source_size=None,
@@ -124,7 +124,7 @@ def write(s):
124124
write("# Size of source mod 2**32: %d bytes" % source_size)
125125

126126
grammar = dict(PARSER_DEFAULT_DEBUG)
127-
if showgrammar:
127+
if showgrammar.get("reduce", False):
128128
grammar["reduce"] = True
129129

130130
debug_opts = {"asm": showasm, "tree": showast, "grammar": grammar}

0 commit comments

Comments
 (0)