+
+ def recursive_resolve_tasks(self, module, parents):
+ for subexpr in (self.lhs, self.rhs):
+ if subexpr != None:
+ subexpr.recursive_resolve_tasks(module, parents)
+ self.contains_listelement_ref |= subexpr.contains_listelement_ref
+
+ def resolve(self, module, parents):
+ if self.op == 'enumref':
+ self.lenfield_type = module.get_type(self.lenfield_name[0])
+ self.lenfield_name = self.lenfield_name[1]
+ elif self.op == 'sumof':
+ # need to find the field with lenfield_name
+ for p in reversed(parents):
+ fields = dict([(f.field_name, f) for f in p.fields])
+ if self.lenfield_name in fields.keys():
+ if p.is_case_or_bitcase:
+ # switch is the anchestor
+ self.lenfield_parent = p.parents[-1]
+ else:
+ self.lenfield_parent = p
+ self.lenfield_type = fields[self.lenfield_name].field_type
+ break
+
+ self.recursive_resolve_tasks(module, parents)
+