InsertAfter() public method

public InsertAfter ( Type stepExactType, ICompilerStep step ) : CompilerPipeline
stepExactType System.Type
step ICompilerStep
return CompilerPipeline
Exemplo n.º 1
0
 public static CompilerPipeline AdjustPipeline(EvaluationContext context, CompilerPipeline pipeline)
 {
     pipeline.InsertAfter(typeof(IntroduceUnityGlobalNamespaces), new IntroduceScriptingNamespace(context));
     pipeline.InsertAfter(typeof(IntroduceScriptingNamespace), new IntroduceImports(context));
     pipeline.InsertAfter(typeof(ApplySemantics), new IntroduceEvaluationContext(context));
     pipeline.Replace(typeof(ProcessUnityScriptMethods), new ProcessScriptingMethods(context));
     pipeline.InsertAfter(typeof(ProcessScriptingMethods), new IntroduceReturnValue());
     return pipeline;
 }
        public static CompilerPipeline Extend(CompilerPipeline pipeline) {
            if(pipeline.Find(typeof(ExtensionsPreprocessorCompilerStep))==-1) {
#if !LIB2
                if (pipeline.Find(typeof (BooParsingStep)) != -1) {
                    pipeline.InsertAfter(typeof (BooParsingStep), new ExtensionsPreprocessorCompilerStep());
                }
#else
                if (pipeline.Find(typeof(Parsing)) != -1)
                {
                    pipeline.InsertAfter(typeof(Parsing), new ExtensionsPreprocessorCompilerStep());
                }
#endif
            }
            return pipeline;
        }
 public static CompilerPipeline AdjustBooPipeline(CompilerPipeline pipeline)
 {
     pipeline.Insert(0, new PreProcess());
     pipeline.Replace(typeof(Parsing), new UnityScript.Steps.Parse());
     pipeline.Replace(typeof(IntroduceGlobalNamespaces), new IntroduceUnityGlobalNamespaces());
     pipeline.InsertAfter(typeof(PreErrorChecking), new ApplySemantics());
     pipeline.InsertAfter(typeof(ApplySemantics), new ApplyDefaultVisibility());
     pipeline.InsertBefore(typeof(ExpandDuckTypedExpressions), new ProcessAssignmentToDuckMembers());
     pipeline.Replace(typeof(ProcessMethodBodiesWithDuckTyping), new ProcessUnityScriptMethods());
     pipeline.InsertAfter(typeof(ProcessUnityScriptMethods), new AutoExplodeVarArgsInvocations());
     pipeline.InsertAfter(typeof(ProcessUnityScriptMethods), new ProcessEvalInvocations());
     UnityScriptCompilerModule.ReplaceOptional(pipeline, typeof(ExpandDuckTypedExpressions), new ExpandUnityDuckTypedExpressions());
     pipeline.InsertBefore(typeof(EmitAssembly), new Lint());
     pipeline.InsertBefore(typeof(EmitAssembly), new EnableRawArrayIndexing());
     pipeline.InsertAfter(typeof(BindBaseTypes), new CheckBaseTypes());
     return pipeline;
 }
Exemplo n.º 4
0
        /// <summary>
        /// Customise the compiler to fit the etl engine
        /// </summary>
        protected override void CustomizeCompiler(BooCompiler compiler, CompilerPipeline pipeline, string[] urls)
        {
            compiler.Parameters.References.Add(typeof(EtlDslEngine).Assembly);
            compiler.Parameters.References.Add(typeof(EtlProcess).Assembly);
            pipeline.Insert(1, new AutoReferenceFilesCompilerStep());
            pipeline.Insert(2, new UseModuleNameAsNamespaceIfMissing());
            pipeline.Insert(3, new AutoImportCompilerStep(_namespaces));

            pipeline.InsertAfter(typeof(MacroAndAttributeExpansion), 
                new CorrelateTypesToModuleName(moduleNameToContainedTypes));
        }