public class DoubleConst extends ASTree
| Modifier and Type | Field and Description |
|---|---|
protected int |
type |
protected double |
value |
| Constructor and Description |
|---|
DoubleConst(double v,
int tokenId) |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(Visitor v)
Is a method for the visitor pattern.
|
ASTree |
compute(int op,
ASTree right) |
private static DoubleConst |
compute(int op,
double value1,
double value2,
int newType) |
private DoubleConst |
compute0(int op,
DoubleConst right) |
private DoubleConst |
compute0(int op,
IntConst right) |
double |
get() |
int |
getType() |
void |
set(double v) |
java.lang.String |
toString() |
public double get()
public void set(double v)
public int getType()
public void accept(Visitor v) throws CompileError
ASTreeatXXX() on the given visitor, where
XXX is the class name of the node object.accept in class ASTreeCompileErrorprivate DoubleConst compute0(int op, DoubleConst right)
private DoubleConst compute0(int op, IntConst right)
private static DoubleConst compute(int op, double value1, double value2, int newType)