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