Skip to content

Commit

Permalink
Update test.py
Browse files Browse the repository at this point in the history
  • Loading branch information
simonlindholm committed Sep 25, 2020
1 parent 2d3b306 commit 8a2c931
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions test.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
#!/usr/bin/env python3
import sys

from pycparser import parse_file, c_generator

if len(sys.argv) < 2:
print(f"Usage: {sys.argv[0]} filename.c")
exit()
fname = "test.c" if len(sys.argv) < 2 else sys.argv[1]


# ast = c_parser.CParser().parse(src)
ast = parse_file(sys.argv[1], use_cpp=True)
ast = parse_file(fname, use_cpp=True)
# ast.show()
# print(c_generator.CGenerator().visit(ast))
print(ast)

0 comments on commit 8a2c931

Please sign in to comment.