public ProcConstructorDefault(ClassAST classAST)
 {
     RetZType           = ZLangBasicTypes.ZVOID;
     ASTClass           = classAST;
     Raw                = null;
     ConstructorContext = new ContextConstructor(ASTClass.ClassContext);
 }
Exemple #2
0
 public override void AnalyBody()
 {
     if (ConstructorContext == null)
     {
         ConstructorContext = new ContextConstructor(this.ASTClass.ClassContext);
     }
     this.Body.Analy();
 }
        public async void Execute_WhenTypeAndAssemblyPassed_ShouldCreateResult()
        {
            TryToObtainType processor = new TryToObtainType();

            var context =
                ContextConstructor.BuildQueryContext <IProcessor>()
                .Use("ProcessorTypeString", "Pipelines.Xml.Tests.Units.Data.EmptyTestProcessor, Pipelines.Xml.Tests.Units")
                .OriginalContext;

            await processor.Execute(context);

            context.HasProperty("ProcessorType").Should().BeTrue("library should build a type from type name and library name as a minimum requirement");
        }
Exemple #4
0
 public ProcConstructor(ClassAST classAST, SectionProcRaw raw)
 {
     RetZType                 = ZLangBasicTypes.ZVOID;
     ASTClass                 = classAST;
     Raw                      = raw;
     NameBracketRaw           = Raw.NamePart.GetNameBracket();
     ConstructorContext       = new ContextConstructor(ASTClass.ClassContext);
     ConstructorParameterList = new List <ConstructorParameter>();
     foreach (var item in NameBracketRaw.Parameters)
     {
         ConstructorParameter cp = new ConstructorParameter(this, item);
         ConstructorParameterList.Add(cp);
     }
     Body = new StmtBlock(this, Raw.Body);
 }