2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-25 03:08:27 +08:00

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):
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):