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

View File

@ -80,8 +80,12 @@ class IODelayEstimator(algorithm.Visitor):
def visit_ModuleT(self, node): def visit_ModuleT(self, node):
try: try:
self.visit(node.body) for stmt in node.body:
except (diagnostic.Error, _UnknownDelay): 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 pass # we don't care; module-level code is never interleaved
def visit_function(self, args, body, typ, loc): def visit_function(self, args, body, typ, loc):