transforms.iodelay_estimator: skip statements, not modules on _UnknownDelay.

This commit is contained in:
whitequark 2015-11-17 01:00:10 +03:00
parent 44d0a35409
commit 9e0a5b9404
1 changed files with 6 additions and 2 deletions

View File

@ -80,8 +80,12 @@ class IODelayEstimator(algorithm.Visitor):
def visit_ModuleT(self, node):
try:
self.visit(node.body)
except (diagnostic.Error, _UnknownDelay):
for stmt in node.body:
try:
self.visit(stmt)
except _UnknownDelay:
pass # more luck next time?
except diagnostic.Error:
pass # we don't care; module-level code is never interleaved
def visit_function(self, args, body, typ, loc):