diff options
Diffstat (limited to 'lab/show_ast.py')
| -rw-r--r-- | lab/show_ast.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lab/show_ast.py b/lab/show_ast.py new file mode 100644 index 00000000..5e5bd04a --- /dev/null +++ b/lab/show_ast.py @@ -0,0 +1,11 @@ +# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0 +# For details: https://github.com/nedbat/coveragepy/blob/master/NOTICE.txt + +"""Dump the AST of a file.""" + +import ast +import sys + +from coverage.parser import ast_dump + +ast_dump(ast.parse(open(sys.argv[1], "rb").read())) |
