| 147 | } |
| 148 | |
| 149 | TypeDeclPtr Enumeration::makeEnumType() const { |
| 150 | TypeDeclPtr res = nullptr; |
| 151 | switch (baseType) { |
| 152 | case Type::tInt8: |
| 153 | case Type::tUInt8: |
| 154 | res = new TypeDecl(Type::tEnumeration8); break; |
| 155 | case Type::tInt16: |
| 156 | case Type::tUInt16: |
| 157 | res = new TypeDecl(Type::tEnumeration16); break; |
| 158 | case Type::tInt: |
| 159 | case Type::tUInt: |
| 160 | res = new TypeDecl(Type::tEnumeration); break; |
| 161 | case Type::tInt64: |
| 162 | case Type::tUInt64: |
| 163 | res = new TypeDecl(Type::tEnumeration64); break; |
| 164 | default: |
| 165 | DAS_ASSERTF(0, "we should not be here. unsupported enumeration base type."); |
| 166 | return nullptr; |
| 167 | } |
| 168 | res->enumType = const_cast<Enumeration*>(this); |
| 169 | return res; |
| 170 | } |
| 171 | |
| 172 | |
| 173 | pair<ExpressionPtr,bool> Enumeration::find ( const string & na ) const { |
no outgoing calls
no test coverage detected