summaryrefslogtreecommitdiff
path: root/lab/show_ast.py
blob: 5e5bd04a5365d6c03c83934c853f06b3f35bb8ef (plain)
1
2
3
4
5
6
7
8
9
10
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()))