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

MakeScriptCode() public method

public MakeScriptCode ( IronPython.Compiler.Ast.PythonAst ast ) : ScriptCode
ast IronPython.Compiler.Ast.PythonAst
return Microsoft.Scripting.ScriptCode
        public override ScriptCode MakeScriptCode(PythonAst ast) {
            PythonCompilerOptions pco = ast.CompilerContext.Options as PythonCompilerOptions;
            // reduce to LightLambda then to Lambda
            var code = (MSAst.Expression<LookupCompilationDelegate>)ast.Reduce().Reduce();

            return new PythonSavableScriptCode(code, ast.SourceUnit, ast.GetNames(), pco.ModuleName);
        }