]> granicus.if.org Git - python/commit
Handle more syntax errors.
authorJeremy Hylton <jeremy@alum.mit.edu>
Mon, 17 Sep 2001 18:03:55 +0000 (18:03 +0000)
committerJeremy Hylton <jeremy@alum.mit.edu>
Mon, 17 Sep 2001 18:03:55 +0000 (18:03 +0000)
commit37c9351cf6efbe58e01fd879a1d60cc6073ced6b
treeea89cd6bdc54124e7b36b203269c1f68a89442e0
parent09392b77a4d8be766e394177a466d51c2a64480f
Handle more syntax errors.

Invoke compiler.syntax.check() after building AST.  If a SyntaxError
occurs, print the error and exit without generating a .pyc file.

Refactor code to use compiler.misc.set_filename() rather than passing
filename argument around to each CodeGenerator instance.
Lib/compiler/pycodegen.py
Lib/compiler/syntax.py [new file with mode: 0644]
Tools/compiler/compiler/pycodegen.py
Tools/compiler/compiler/syntax.py [new file with mode: 0644]