예제 #1
0
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();
	}
}
예제 #2
0
//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();
	}
}