| 772 | } |
| 773 | |
| 774 | const DataType* ElaborationStep::bindTypeDef_( |
| 775 | TypeDef* typd, const DesignComponent* parent, |
| 776 | ErrorDefinition::ErrorType errtype) { |
| 777 | Compiler* compiler = m_compileDesign->getCompiler(); |
| 778 | SymbolTable* symbols = compiler->getSymbolTable(); |
| 779 | NodeId defNode = typd->getDefinitionNode(); |
| 780 | const FileContent* fC = typd->getFileContent(); |
| 781 | VObjectType defType = fC->Type(defNode); |
| 782 | std::string objName; |
| 783 | if (defType == VObjectType::slStringConst) { |
| 784 | objName = fC->SymName(defNode); |
| 785 | } else if (defType == VObjectType::paClass_scope) { |
| 786 | NodeId class_type = fC->Child(defNode); |
| 787 | NodeId nameId = fC->Child(class_type); |
| 788 | objName.assign(fC->SymName(nameId)) |
| 789 | .append("::") |
| 790 | .append(fC->SymName(fC->Sibling(defNode))); |
| 791 | } else { |
| 792 | objName = "NOT_A_VALID_TYPE_NAME"; |
| 793 | symbols->registerSymbol(objName); |
| 794 | } |
| 795 | |
| 796 | const DataType* result = bindDataType_(objName, fC, defNode, parent, errtype); |
| 797 | if (result != typd) |
| 798 | return result; |
| 799 | else |
| 800 | return nullptr; |
| 801 | } |
| 802 | |
| 803 | const DataType* ElaborationStep::bindDataType_( |
| 804 | std::string_view type_name, const FileContent* fC, NodeId id, |
nothing calls this directly
no test coverage detected