IronPython.Compiler.Ast.ToDiskCompilationMode.PrepareScope C# (CSharp) Method

PrepareScope() public method

public PrepareScope ( IronPython.Compiler.Ast.PythonAst ast, System locals, List init ) : void
ast IronPython.Compiler.Ast.PythonAst
locals System
init List
return void
        public override void PrepareScope(PythonAst ast, System.Runtime.CompilerServices.ReadOnlyCollectionBuilder<MSAst.ParameterExpression> locals, List<MSAst.Expression> init) {
            locals.Add(PythonAst._globalArray);
            init.Add(
                Ast.Assign(
                    PythonAst._globalArray,
                    Ast.Call(
                        typeof(PythonOps).GetMethod("GetGlobalArrayFromContext"),
                        PythonAst._globalContext
                    )
                )
            );
        }