Beispiel #1
0
        private CodeCompileUnit DoParse(params ICompilerInput[] inputs)
        {
            DoParseLocals53 DoParseLocals = new DoParseLocals53();
            BooCompiler     booCompiler   = new BooCompiler();

            booCompiler.Parameters.Pipeline = new ResolveExpressions();
            CompilerPipeline pipeline = booCompiler.Parameters.Pipeline;

            pipeline.BreakOnErrors = false;
            // TODO
            //pipeline.AfterStep += $adaptor$__BooCodeParser$callable2$27_25__$CompilerStepEventHandler$0.Adapt(this.$DoParse$closure$5);
            pipeline.Replace(typeof(ProcessMethodBodiesWithDuckTyping), new FakeProcessMethodBodies());
            booCompiler.Parameters.Input.AddRange(inputs);
            AppDomain.CurrentDomain.GetAssemblies();
            HashSet <string> hashSet = new HashSet <string>(this._references);

            hashSet.Add("System.Windows.Forms");
            hashSet.Add("System.Drawing");
            Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies();
            int        i          = 0;

            Assembly[] array = assemblies;
            for (int length = array.Length; i < length; i = checked (i + 1))
            {
                if (RuntimeServices.op_Member(array[i].GetName().Name, hashSet))
                {
                    hashSet.Remove(array[i].GetName().Name);
                    booCompiler.Parameters.References.Add(array[i]);
                }
            }
            DoParseLocals.context = booCompiler.Run();
            if (DoParseLocals.context.Errors.Count > 0)
            {
                throw ((Boo.Lang.List <Boo.Lang.Compiler.CompilerError>)DoParseLocals.context.Errors)[0];
            }
            DoParseLocals.converter = new BooCodeDomConverter();
            ActiveEnvironment.With(new InstantiatingEnvironment(), new DoParseClosure6(DoParseLocals).Invoke);
            return(DoParseLocals.converter.CodeDomUnit);
        }
Beispiel #2
0
 public DoParseClosure6(DoParseLocals53 locals54)
 {
     this._locals54 = locals54;
 }