| 4109 | } |
| 4110 | |
| 4111 | const typespec *getMemberTypespec(const typespec *tpss, |
| 4112 | const std::vector<std::string> &suffixes, |
| 4113 | uint32_t index) { |
| 4114 | const typespec *result = nullptr; |
| 4115 | if (tpss == nullptr) return result; |
| 4116 | if (tpss->UhdmType() == uhdmstruct_typespec) { |
| 4117 | const struct_typespec *ts = (const struct_typespec *)tpss; |
| 4118 | for (typespec_member *memb : *ts->Members()) { |
| 4119 | if (memb->VpiName() == suffixes[index]) { |
| 4120 | if (const UHDM::ref_typespec *rt = memb->Typespec()) { |
| 4121 | result = rt->Actual_typespec(); |
| 4122 | } |
| 4123 | if (result && (index < (suffixes.size() - 1))) { |
| 4124 | if (result->UhdmType() == uhdmstruct_typespec) { |
| 4125 | result = getMemberTypespec(result, suffixes, index + 1); |
| 4126 | } |
| 4127 | } |
| 4128 | break; |
| 4129 | } |
| 4130 | } |
| 4131 | } |
| 4132 | return result; |
| 4133 | } |
| 4134 | |
| 4135 | const typespec *CompileHelper::getTypespec(DesignComponent *component, |
| 4136 | const FileContent *fC, NodeId id, |