void TypeChecker::searchScopesAndLink(Scope * scope){ if (scope == nullptr) return; parseScopeForClassDecl(scope); Scope* innersWalker = scope->getInnerScope(); if (innersWalker == nullptr) return; while (innersWalker != nullptr){ searchScopesAndLink(innersWalker); innersWalker = innersWalker->getNextScope(); } }
//searches the scope recursivly looking for classes declarations void TypeChecker::searchScopeForFunctions(Scope* scope){ if (scope == nullptr) return; parseScopeForFunctions(scope); Scope* innersWalker = scope->getInnerScope(); if (innersWalker == nullptr) return; while (innersWalker != nullptr){ //parseScope(innersWalker); searchScopeForFunctions(innersWalker); innersWalker = innersWalker->getNextScope(); } }