Lines Matching full:scope
19 #include <binder/scope.h>
211 res.variable->SetLexical(res.scope, program_->HotfixHelper()); in LookupReference()
218 Scope *scope = iter->IsFunctionParamScope() ? iter : iter->EnclosingVariableScope(); in InstantiateArguments() local
220 const auto *node = scope->Node(); in InstantiateArguments()
222 if (scope->IsLoopScope()) { in InstantiateArguments()
223 iter = scope->Parent(); in InstantiateArguments()
233 …scope->AddDecl<ConstDecl, LocalVariable>(Allocator(), FUNCTION_ARGUMENTS, VariableFlags::INITIALIZ… in InstantiateArguments()
240 scope = iter->AsFunctionParamScope()->GetFunctionScope(); in InstantiateArguments()
241 scope->Bindings().insert({argumentsVariable->Name(), argumentsVariable}); in InstantiateArguments()
244 scope->AsVariableScope()->AddFlag(VariableScopeFlags::USE_ARGS); in InstantiateArguments()
249 iter = scope->Parent(); in InstantiateArguments()
264 res.variable->SetLexical(res.scope, program_->HotfixHelper()); in LookupIdentReference()
306 void Binder::BuildScriptFunction(Scope *outerScope, const ir::ScriptFunction *scriptFunc) in BuildScriptFunction()
392 Scope *scope = nullptr; in BuildTSSignatureDeclarationBaseParams() local
396 scope = typeNode->AsTSFunctionType()->Scope(); in BuildTSSignatureDeclarationBaseParams()
400 scope = typeNode->AsTSConstructorType()->Scope(); in BuildTSSignatureDeclarationBaseParams()
404 scope = typeNode->AsTSSignatureDeclaration()->Scope(); in BuildTSSignatureDeclarationBaseParams()
408 scope = typeNode->AsTSMethodSignature()->Scope(); in BuildTSSignatureDeclarationBaseParams()
417 ASSERT(scope && scope->IsFunctionParamScope()); in BuildTSSignatureDeclarationBaseParams()
419 auto scopeCtx = LexicalScope<FunctionParamScope>::Enter(this, scope->AsFunctionParamScope()); in BuildTSSignatureDeclarationBaseParams()
448 auto scopeCtx = LexicalScope<LocalScope>::Enter(this, classDef->Scope()); in BuildClassDefinition()
470 auto *loopScope = forUpdateStmt->Scope(); in BuildForUpdateLoop()
506 …auto paramScopeCtx = LexicalScope<CatchParamScope>::Enter(this, catchClauseStmt->Scope()->ParamSco… in BuildCatchClause()
510 auto scopeCtx = LexicalScope<CatchScope>::Enter(this, catchClauseStmt->Scope()); in BuildCatchClause()
543 auto *funcScope = scriptFunc->Scope(); in ResolveReference()
584 auto scopeCtx = LexicalScope<FunctionScope>::Enter(this, ctor->Scope()); in ResolveReference()
590 … auto scopeCtx = LexicalScope<Scope>::Enter(this, childNode->AsBlockStatement()->Scope()); in ResolveReference()
599 … auto scopeCtx = LexicalScope<LocalScope>::Enter(this, childNode->AsSwitchStatement()->Scope()); in ResolveReference()
609 auto loopScopeCtx = LexicalScope<LoopScope>::Enter(this, doWhileStatement->Scope()); in ResolveReference()
621 auto loopScopeCtx = LexicalScope<LoopScope>::Enter(this, whileStatement->Scope()); in ResolveReference()
632 …BuildForInOfLoop(forInStmt, forInStmt->Scope(), forInStmt->Left(), forInStmt->Right(), forInStmt->… in ResolveReference()
638 …BuildForInOfLoop(forOfStmt, forOfStmt->Scope(), forOfStmt->Left(), forOfStmt->Right(), forOfStmt->… in ResolveReference()
660 … auto scopeCtx = LexicalScope<Scope>::Enter(this, childNode->AsTSModuleDeclaration()->Scope()); in ResolveReference()
719 ASSERT(ctor->Scope()->HasFlag(VariableScopeFlags::INNER_ARROW)); in AddMandatoryParams()
720 ctor->Scope()->AddFlag(VariableScopeFlags::SET_LEXICAL_FUNCTION); in AddMandatoryParams()
746 auto *scope = GetScope(); in AddDeclarationName() local
747 while (scope != nullptr) { in AddDeclarationName()
748 if (scope->IsTSModuleScope()) { in AddDeclarationName()
749 scope->AsTSModuleScope()->AddDeclarationName(name); in AddDeclarationName()
751 scope = scope->Parent(); in AddDeclarationName()