3 public class IntegerLiteralExpr extends LiteralExpr {
7 public IntegerLiteralExpr(int value) {
9 td = ReservedTypeDescriptor.INT;
12 public abstract boolean equals(Map remap, Expr e) {
15 else if (!e instanceof IntegerLiteralExpr)
17 else return (((IntegerLiteralExpr)e).value==value);
20 public int getValue() {
24 public void generate(CodeWriter writer, VarDescriptor dest) {
25 writer.outputline("int " + dest.getSafeSymbol() + " = " + value + ";");
28 public void prettyPrint(PrettyPrinter pp) {
29 pp.output("" + value);
32 public TypeDescriptor typecheck(SemanticAnalyzer sa) {
33 td = ReservedTypeDescriptor.INT;