示例#1
0
        public StmtForeach(StmtForeachRaw raw, Stmt parentStmt)
        {
            Raw        = raw;
            ParentStmt = parentStmt;

            StmtBody = new StmtBlock(this, raw.Body);
        }
示例#2
0
 public ProcMethod(ClassAST classAST, SectionProcRaw raw)
 {
     ASTClass      = classAST;
     Raw           = raw;
     MethodContext = new ContextMethod(ASTClass.ClassContext);
     NamePart      = new MethodName(this, Raw.NamePart);
     Body          = new StmtBlock(this, Raw.Body);
 }
示例#3
0
        public SectionConstructor(SectionProc proc)
        {
            foreach (var item in proc.NamePart.NameTerms)
            {
                Args.Add(item as ProcArg);
            }
            this.Body = proc.Body;

            constructorDesc = new ZConstructorDesc();
        }
示例#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);
 }
示例#5
0
 public StmtCatch(StmtCatchRaw raw, Stmt parentStmt)
 {
     Raw        = raw;
     ParentStmt = parentStmt;
     StmtBody   = new StmtBlock(this, raw.CatchBody);
 }
示例#6
0
 public StmtWhile(StmtWhileRaw raw, Stmt parentStmt)
 {
     Raw        = raw;
     ParentStmt = parentStmt;
     StmtBody   = new StmtBlock(this, raw.WhileBody);
 }
示例#7
0
 public StmtIf_ElseIf(StmtIf parentStmt, StmtIfRaw.IfElseStmt raw)
 {
     ParentStmt = parentStmt;
     Raw        = raw;
     StmtBody   = new StmtBlock(this, raw.Body);
 }
示例#8
0
 public StmtRepeat(StmtRepeatRaw raw, Stmt parentStmt)
 {
     Raw        = raw;
     ParentStmt = parentStmt;
     RepeatBody = new StmtBlock(this, raw.RepeatBody);
 }