summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/dump_ast.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/dump_ast.py b/examples/dump_ast.py
index 2cff874..63f5e2d 100644
--- a/examples/dump_ast.py
+++ b/examples/dump_ast.py
@@ -19,7 +19,9 @@ from pycparser import c_parser, c_ast, parse_file
if __name__ == "__main__":
argparser = argparse.ArgumentParser('Dump AST')
argparser.add_argument('filename', help='name of file to parse')
+ argparser.add_argument('--coord', help='show coordinates in the dump',
+ action='store_true')
args = argparser.parse_args()
ast = parse_file(args.filename, use_cpp=False)
- ast.show()
+ ast.show(showcoord=args.coord)