private ExpEachItem AnalyEach() { this.ExpContext.Stmt.HasEach = true; StmtCall callStmt = this.ExpContext.Stmt as StmtCall; ExpEach eachExp = new ExpEach(this.ExpContext, this.LeftExp); callStmt.SetEachExp(eachExp); eachExp.Analy(); ExpEachItem itemExp = eachExp.GetItemExp(); return(itemExp); }
private void CreateContext() { NestedClassContext = new ContextClass(this.ExpContext.FileContext); NestedClassContext.ClassName = this.ExpContext.ProcContext.CreateNestedClassName(); NestedProcContext = new ContextProc(NestedClassContext); NestedProcContext.ProcName = NestedClassContext.ClassName + "$CALL"; NestedProcContext.ProcManagerContext = NestedClassContext.ProcManagerContext; NestedProcContext.ProcManagerContext.Add(NestedProcContext); NestedStmt = new StmtCall(); NestedStmt.ProcContext = NestedProcContext; NestedExpContext = new ContextExp(NestedProcContext, NestedStmt); BodyExp.SetContext(NestedExpContext); CreateEmitContext(); }
private Stmt CreateStmt(StmtRaw raw) { if (raw is StmtCallRaw) { StmtCall stmt = new StmtCall((StmtCallRaw)raw, this); return(stmt); } else if (raw is StmtCatchRaw) { StmtCatch stmt = new StmtCatch((StmtCatchRaw)raw, this); return(stmt); } else if (raw is StmtForeachRaw) { StmtForeach stmt = new StmtForeach((StmtForeachRaw)raw, this); return(stmt); } else if (raw is StmtIfRaw) { StmtIf stmt = new StmtIf((StmtIfRaw)raw, this); return(stmt); } else if (raw is StmtRepeatRaw) { StmtRepeat stmt = new StmtRepeat((StmtRepeatRaw)raw, this); return(stmt); } else if (raw is StmtWhileRaw) { StmtWhile stmt = new StmtWhile((StmtWhileRaw)raw, this); return(stmt); } else { throw new CCException(); } }