Lines Matching full:scope
30 Scope,
33 } from "./scope";
53 export function hoistVar(decl: VarDecl, scope: Scope, pandaGen: PandaGen) {
56 if (scope instanceof GlobalScope) {
59 } else if (scope instanceof FunctionScope || scope instanceof ModuleScope) {
60 let v: ModuleVariable = <ModuleVariable>(scope.findLocal(name)!);
65 pandaGen.storeAccToLexEnv(NodeKind.FirstNodeOfFunction, scope, 0, v, true);
68 throw new Error("Wrong scope to hoist");
72 export function hoistFunction(decl: FuncDecl, scope: Scope, pandaGen: PandaGen, compiler: Compiler,…
77 if (scope instanceof GlobalScope) {
80 …} else if ((scope instanceof FunctionScope) || (scope instanceof LocalScope) || (scope instanceof …
81 let v: ModuleVariable = <ModuleVariable>(scope.findLocal(funcName)!);
86 pandaGen.storeAccToLexEnv(NodeKind.FirstNodeOfFunction, scope, 0, v, true);
89 throw new Error("Wrong scope to hoist");
94 export function hoistFunctionInBlock(scope: Scope, pandaGen: PandaGen, strictMode: boolean, compile…
95 let decls = scope.getDecls();
106 hoistFunction(func, scope, pandaGen, compiler, compilerDriver);