home *** CD-ROM | disk | FTP | other *** search
/ Tutto per Internet / Internet.iso / soft95 / Java / espints / espinst.exe / classes / espresso / New.class (.txt) < prev    next >
Encoding:
Java Class File  |  1996-02-28  |  1.3 KB  |  46 lines

  1. package espresso;
  2.  
  3. class New extends AST {
  4.    AST constr;
  5.  
  6.    void print(int var1) {
  7.       Pretty.open(var1, 10);
  8.       System.out.print("new ");
  9.       this.constr.print();
  10.       Pretty.close(var1, 10);
  11.    }
  12.  
  13.    Item gen() {
  14.       this.constr.genLoad();
  15.       return Item.stackItem;
  16.    }
  17.  
  18.    AST simplify() {
  19.       this.constr = this.constr.simplify();
  20.       return this;
  21.    }
  22.  
  23.    void markCaptured(Bits var1) {
  24.       this.constr.markCaptured(var1);
  25.    }
  26.  
  27.    Typ attr(Env var1, int var2, Typ var3) {
  28.       if (Attr.checkKind(super.pos, 12, var2)) {
  29.          super.typ = Attr.checkTyp(super.pos, this.constr.attr(var1, 2, Typ.anyTyp), var3);
  30.       } else {
  31.          super.typ = Typ.errTyp;
  32.       }
  33.  
  34.       return super.typ;
  35.    }
  36.  
  37.    boolean isExpr() {
  38.       return true;
  39.    }
  40.  
  41.    New(int var1, AST var2) {
  42.       super(var1, 7);
  43.       this.constr = var2;
  44.    }
  45. }
  46.