Commit 58b37a83 authored by scoder's avatar scoder

Merge pull request #230 from nnemkin/pxd_errors_fix

Do not abort .pxd processing due to previous unrelated errors.
parents 26531b24 f0b06798
...@@ -290,6 +290,7 @@ class Context(object): ...@@ -290,6 +290,7 @@ class Context(object):
source_filename = source_desc.filename source_filename = source_desc.filename
scope.cpp = self.cpp scope.cpp = self.cpp
# Parse the given source file and return a parse tree. # Parse the given source file and return a parse tree.
num_errors = Errors.num_errors
try: try:
f = Utils.open_source_file(source_filename, "rU") f = Utils.open_source_file(source_filename, "rU")
try: try:
...@@ -321,7 +322,7 @@ class Context(object): ...@@ -321,7 +322,7 @@ class Context(object):
"Decoding error, missing or incorrect coding=<encoding-name> " "Decoding error, missing or incorrect coding=<encoding-name> "
"at top of source (cannot decode with encoding %r: %s)" % (encoding, msg)) "at top of source (cannot decode with encoding %r: %s)" % (encoding, msg))
if Errors.num_errors > 0: if Errors.num_errors > num_errors:
raise CompileError() raise CompileError()
return tree return tree
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment