00001: package clogs.ast;
00002: 
00003: import clogs.util.Optional;
00004: 
00005: 
00006: public abstract class Exp
00007: {
00008:   public final Optional<Type> to;
00009: 
00010:   
00011:   Exp (Optional<Type> to)
00012:   {
00013:     clogs.util.NonNull.check (to);
00014:     this.to = to;
00015:   }
00016: 
00017: 
00018:   public abstract Exp setType (Type type);
00019: 
00020: 
00021:   public String toString ()
00022:   {
00023:     PrettyPrinter pp = new PrettyPrinter ();
00024:     pp.printExp (this);
00025:     return pp.toString ();
00026:   }
00027: }
00028: