Before we add member function outside of the class definition, we should imitate that we're inside class definition
| 5059 | |
| 5060 | // Before we add member function outside of the class definition, we should imitate that we're inside class definition |
| 5061 | void TypeContinue(const char* pos) |
| 5062 | { |
| 5063 | if(newType) |
| 5064 | ThrowError(pos, "ERROR: cannot continue type '%s' definition inside '%s' type. Possible cause: external member function definition syntax inside a class", currType->GetFullTypeName(), newType->GetFullTypeName()); |
| 5065 | newType = currType; |
| 5066 | newType->definitionDepth = varInfoTop.size(); |
| 5067 | // Add all member variables to global scope |
| 5068 | BeginBlock(); |
| 5069 | for(TypeInfo::MemberVariable *curr = newType->firstVariable; curr; curr = curr->next) |
| 5070 | { |
| 5071 | currType = curr->type; |
| 5072 | currAlign = 4; |
| 5073 | VariableInfo *varInfo = (VariableInfo*)AddVariable(pos, InplaceStr(curr->name), false); |
| 5074 | varInfo->isGlobal = true; |
| 5075 | varInfo->parentType = newType; |
| 5076 | varDefined = false; |
| 5077 | } |
| 5078 | // Restore all type aliases defined inside a class |
| 5079 | AliasInfo *info = newType->childAlias; |
| 5080 | while(info) |
| 5081 | { |
| 5082 | CodeInfo::classMap.insert(info->nameHash, info->type); |
| 5083 | info = info->next; |
| 5084 | } |
| 5085 | } |
| 5086 | |
| 5087 | // End of outside class member definition |
| 5088 | void TypeStop() |
no test coverage detected