00001: package clogs.ast;
00002: 
00003: import clogs.util.List;
00004: 
00005: 
00006: public class StatWhile extends Stat
00007: {
00008:   public final Exp exp;
00009:   public final Stat stat;
00010: 
00011: 
00012:   public StatWhile (Exp exp, Stat stat)
00013:   {
00014:     this (List.<String>nil (), exp, stat);
00015:   }
00016: 
00017: 
00018:   StatWhile (List<String> labels, Exp exp, Stat stat)
00019:   {
00020:     super (labels);
00021:     clogs.util.NonNull.check (exp, stat);
00022:     this.exp = exp;
00023:     this.stat = stat;
00024:   }
00025: 
00026: 
00027:   public Stat removeLabels ()
00028:   {
00029:     return new StatWhile (List.<String> nil (), exp, stat);
00030:   }
00031: 
00032: 
00033:   public Stat addLabel (String label)
00034:   {
00035:     return new StatWhile (labels.cons (label), exp, stat);
00036:   }
00037: }
00038: