blob: 5c65ecae40f334c50577d761b19ca61cf44aafe1 [file] [log] [blame]
Jeremy Hylton8c783412000-03-06 19:04:14 +00001"""Package for parsing and compiling Python source code
2
3There are several functions defined at the top level that are imported
4from modules contained in the package.
5
6parse(buf) -> AST
7 Donverts a string containing Python source code to an abstract
8 syntax tree (AST). The AST is defined in compiler.ast.
9
10parseFile(path) -> AST
11 The same as parse(open(path))
12
13walk(ast, visitor, verbose=None)
14 Does a pre-order walk over the ast using the visitor instance.
15 See compiler.visitor for details.
Jeremy Hyltonf728f9a12000-03-06 19:12:33 +000016
17compile(filename)
18 Generates a .pyc file by compilining filename.
Jeremy Hylton8c783412000-03-06 19:04:14 +000019"""
20
21from transformer import parse, parseFile
22from visitor import walk
Jeremy Hyltonf728f9a12000-03-06 19:12:33 +000023from pycodegen import compile
Jeremy Hylton8c783412000-03-06 19:04:14 +000024