CSC448: Parsing: Clogs AST: Declarations [16/26] |
file:Decl.java [source] [doc-public] [doc-private]
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:
file:InitDecl.java [source] [doc-public] [doc-private]
00001: package clogs.ast; 00002: 00003: import clogs.util.List; 00004: import clogs.util.Optional; 00005: 00006: 00007: public class InitDecl 00008: { 00009: public final String name; 00010: public final Optional<Exp> eo; 00011: 00012: 00013: public InitDecl (String name, Optional<Exp> eo) 00014: { 00015: clogs.util.NonNull.check (name, eo); 00016: this.name = name; 00017: this.eo = eo; 00018: } 00019: } 00020:
file:ExtDecl.java [source] [doc-public] [doc-private]
00001: package clogs.ast; 00002: 00003: 00004: public abstract class ExtDecl 00005: { 00006: } 00007: