예제 #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);
 }