~ubuntu-branches/ubuntu/karmic/pypy/karmic

« back to all changes in this revision

Viewing changes to pypy/interpreter/astcompiler/__init__.py

  • Committer: Bazaar Package Importer
  • Author(s): Alexandre Fayolle
  • Date: 2007-04-13 09:33:09 UTC
  • Revision ID: james.westby@ubuntu.com-20070413093309-yoojh4jcoocu2krz
Tags: upstream-1.0.0
ImportĀ upstreamĀ versionĀ 1.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
"""Package for parsing and compiling Python source code
 
2
 
 
3
There are several functions defined at the top level that are imported
 
4
from modules contained in the package.
 
5
 
 
6
parse(buf, mode="exec") -> AST
 
7
    Converts a string containing Python source code to an abstract
 
8
    syntax tree (AST).  The AST is defined in compiler.ast.
 
9
 
 
10
parseFile(path) -> AST
 
11
    The same as parse(open(path))
 
12
 
 
13
walk(ast, visitor, verbose=None)
 
14
    Does a pre-order walk over the ast using the visitor instance.
 
15
    See compiler.visitor for details.
 
16
 
 
17
compile(source, filename, mode, flags=None, dont_inherit=None)
 
18
    Returns a code object.  A replacement for the builtin compile() function.
 
19
 
 
20
compileFile(filename)
 
21
    Generates a .pyc file by compiling filename.
 
22
"""
 
23
 
 
24
# from transformer import parse, parseFile
 
25
# from visitor import walk
 
26
# from pycodegen import compile, compileFile