home *** CD-ROM | disk | FTP | other *** search
/ Symantec Visual Cafe for Java 2.5 / symantec-visual-cafe-2.5-database-dev-edition.iso / VPage / Java.bin / CLASSES.ZIP / sun / tools / tree / PositiveExpression.class (.txt) < prev    next >
Encoding:
Java Class File  |  1997-07-08  |  1.1 KB  |  29 lines

  1. package sun.tools.tree;
  2.  
  3. import sun.tools.java.Environment;
  4. import sun.tools.java.Type;
  5.  
  6. public class PositiveExpression extends UnaryExpression {
  7.    public PositiveExpression(int var1, Expression var2) {
  8.       super(35, var1, var2.type, var2);
  9.    }
  10.  
  11.    void selectType(Environment var1, Context var2, int var3) {
  12.       if ((var3 & 128) != 0) {
  13.          super.type = Type.tDouble;
  14.       } else if ((var3 & 64) != 0) {
  15.          super.type = Type.tFloat;
  16.       } else if ((var3 & 32) != 0) {
  17.          super.type = Type.tLong;
  18.       } else {
  19.          super.type = Type.tInt;
  20.       }
  21.  
  22.       super.right = ((Node)this).convert(var1, var2, super.type, super.right);
  23.    }
  24.  
  25.    Expression simplify() {
  26.       return super.right;
  27.    }
  28. }
  29.