00001: package clogs.ast;
00002: 
00003: import clogs.util.Optional;
00004: 
00005: 
00006: public class ExpAssign extends Exp
00007: {
00008:   public final Exp left;
00009:   public final Exp right;
00010: 
00011: 
00012:   public ExpAssign (Exp left, Exp right)
00013:   {
00014:     this (new Optional<Type> (), left, right);
00015:   }
00016: 
00017: 
00018:   ExpAssign (Optional<Type> to, Exp left, Exp right)
00019:   {
00020:     super (to);
00021:     clogs.util.NonNull.check (left, right);
00022:     this.left = left;
00023:     this.right = right;
00024:   }
00025: 
00026: 
00027:   public Exp setType (Type type)
00028:   {
00029:     return new ExpAssign (new Optional<Type> (type), left, right);
00030:   }
00031: }
00032: