Skip to content

Commit fc7634f

Browse files
Now --show-ast only shows ASTree without any source code
1 parent ace05e1 commit fc7634f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

__main__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def main():
3333
parser = create_arg_parser()
3434
argv = parser.parse_args()
3535

36-
if not argv.no_lua_init:
36+
if not argv.no_lua_init and not argv.show_ast:
3737
print(Translator.get_luainit())
3838

3939
if argv.only_lua_init:
@@ -55,7 +55,7 @@ def main():
5555
show_ast=argv.show_ast)
5656
lua_code = translator.translate(content)
5757

58-
if not argv.only_lua_init:
58+
if not argv.only_lua_init and not argv.show_ast:
5959
print(lua_code)
6060
return 0
6161

0 commit comments

Comments
 (0)