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(); } }
public StmtIf_ElseIf(StmtIf parentStmt, StmtIfRaw.IfElseStmt raw) { ParentStmt = parentStmt; Raw = raw; StmtBody = new StmtBlock(this, raw.Body); }