예제 #1
0
 public DoWhileStmt(Stmt body, Expr cond) {
     this.Body = body;
     this.Cond = cond;
 }
예제 #2
0
 public static DefaultStmt Create(Stmt stmt) =>
 new DefaultStmt(stmt);
예제 #3
0
 public WhileStmt(Expr cond, Stmt body) {
     this.Cond = cond;
     this.Body = body;
 }
예제 #4
0
 private DefaultStmt(Stmt stmt) {
     this.Stmt = stmt;
 }
예제 #5
0
 public static Stmt Create(Expr expr, Stmt stmt) =>
 new CaseStmt(expr, stmt);
예제 #6
0
 public IfStmt(Expr cond, Stmt stmt) {
     this.Cond = cond;
     this.Stmt = stmt;
 }
예제 #7
0
 private LabeledStmt(String label, Stmt stmt) {
     this.Label = label;
     this.Stmt = stmt;
 }
예제 #8
0
 public DefaultStmt(Stmt stmt) {
     this.stmt = stmt;
 }
예제 #9
0
 public IfElseStmt(Expr cond, Stmt true_stmt, Stmt false_stmt) {
     this.cond = cond;
     this.true_stmt = true_stmt;
     this.false_stmt = false_stmt;
 }
예제 #10
0
 public ForStmt(Option<Expr> init, Option<Expr> cond, Option<Expr> loop, Stmt body) {
     this.init = init;
     this.cond = cond;
     this.loop = loop;
     this.body = body;
 }
예제 #11
0
 public CaseStmt(Int32 value, Stmt stmt) {
     this.value = value;
     this.stmt = stmt;
 }
예제 #12
0
 public WhileStmt(Expr cond, Stmt body) {
     if (!cond.type.IsScalar) {
         throw new InvalidProgramException();
     }
     this.cond = cond;
     this.body = body;
 }
예제 #13
0
 public static FuncDef Create(Option <DeclnSpecs> declnSpecs, Declr declr, Stmt body) =>
 new FuncDef(declnSpecs.IsSome ? declnSpecs.Value : DeclnSpecs.Empty, declr, body as CompoundStmt);
예제 #14
0
 public override void Visit(Stmt stmt) {
     throw new InvalidOperationException("Cannot visit abstract Stmt");
 }
예제 #15
0
 public ForStmt(Option<Expr> init, Option<Expr> cond, Option<Expr> loop, Stmt body) {
     this.Init = init;
     this.Cond = cond;
     this.Loop = loop;
     this.Body = body;
 }
예제 #16
0
 public LabeledStmt(String label, Stmt stmt) {
     this.label = label;
     this.stmt = stmt;
 }
예제 #17
0
 public SwitchStmt(Expr expr, Stmt stmt) {
     this.Expr = expr;
     this.Stmt = stmt;
 }
예제 #18
0
 public WhileStmt(Expr cond, Stmt body)
 {
     this.Cond = cond;
     this.Body = body;
 }
예제 #19
0
 public IfElseStmt(Expr cond, Stmt trueStmt, Stmt falseStmt) {
     this.Cond = cond;
     this.TrueStmt = trueStmt;
     this.FalseStmt = falseStmt;
 }
예제 #20
0
 public static Stmt Create(Expr cond, Stmt body) =>
 new WhileStmt(cond, body);
예제 #21
0
 private CaseStmt(Expr expr, Stmt stmt) {
     this.Expr = expr;
     this.Stmt = stmt;
 }
예제 #22
0
 public DoWhileStmt(Stmt body, Expr cond)
 {
     this.Body = body;
     this.Cond = cond;
 }
예제 #23
0
 public static IReadOnlyList<String> GrabLabels(Stmt stmt) {
     GotoLabelsGrabber grabber = new GotoLabelsGrabber();
     stmt.Accept(grabber);
     return grabber.Labels;
 }
예제 #24
0
 public static Stmt Create(Stmt body, Expr cond) =>
 new DoWhileStmt(body, cond);
예제 #25
0
 private DefaultStmt(Stmt stmt)
 {
     this.Stmt = stmt;
 }
예제 #26
0
 public static Stmt Create(Option <Expr> init, Option <Expr> cond, Option <Expr> loop, Stmt body) =>
 new ForStmt(init, cond, loop, body);
 public FuncDef(String name, Decln.SCS scs, TFunction type, Stmt stmt) {
     this.name = name;
     this.scs  = scs;
     this.type = type;
     this.stmt = stmt;
 }
예제 #28
0
 public SwitchStmt(Expr expr, Stmt stmt)
 {
     this.Expr = expr;
     this.Stmt = stmt;
 }
예제 #29
0
 public static Stmt Create(Expr cond, Stmt body) =>
     new WhileStmt(cond, body);
예제 #30
0
 public static Stmt Create(Expr expr, Stmt stmt) =>
 new SwitchStmt(expr, stmt);
예제 #31
0
 public static Stmt Create(Stmt body, Expr cond) =>
     new DoWhileStmt(body, cond);
예제 #32
0
 public IfStmt(Expr cond, Stmt stmt)
 {
     this.Cond = cond;
     this.Stmt = stmt;
 }
예제 #33
0
 public static Stmt Create(Option<Expr> init, Option<Expr> cond, Option<Expr> loop, Stmt body) =>
     new ForStmt(init, cond, loop, body);
예제 #34
0
 public static Stmt Create(Expr cond, Stmt stmt) =>
 new IfStmt(cond, stmt);
예제 #35
0
 public static Stmt Create(Expr expr, Stmt stmt) =>
     new SwitchStmt(expr, stmt);
예제 #36
0
 public IfElseStmt(Expr cond, Stmt trueStmt, Stmt falseStmt)
 {
     this.Cond      = cond;
     this.TrueStmt  = trueStmt;
     this.FalseStmt = falseStmt;
 }
예제 #37
0
 public static Stmt Create(Expr cond, Stmt stmt) =>
     new IfStmt(cond, stmt);
예제 #38
0
 public static Stmt Create(Expr cond, Stmt trueStmt, Stmt falseStmt) =>
 new IfElseStmt(cond, trueStmt, falseStmt);
예제 #39
0
 public static Stmt Create(Expr cond, Stmt trueStmt, Stmt falseStmt) =>
     new IfElseStmt(cond, trueStmt, falseStmt);
예제 #40
0
 private LabeledStmt(String label, Stmt stmt)
 {
     this.Label = label;
     this.Stmt  = stmt;
 }
예제 #41
0
 public static Stmt Create(String label, Stmt stmt) =>
     new LabeledStmt(label, stmt);
예제 #42
0
 public static Stmt Create(String label, Stmt stmt) =>
 new LabeledStmt(label, stmt);
예제 #43
0
 public static Stmt Create(Expr expr, Stmt stmt) =>
     new CaseStmt(expr, stmt);
예제 #44
0
 private CaseStmt(Expr expr, Stmt stmt)
 {
     this.Expr = expr;
     this.Stmt = stmt;
 }
예제 #45
0
 public static DefaultStmt Create(Stmt stmt) =>
     new DefaultStmt(stmt);
예제 #46
0
 public virtual void Visit(Stmt stmt) {}