public class Constant extends ProtoExpression
| Modifier and Type | Field and Description |
|---|---|
static Global |
UNWRAP_INT |
static Global |
UNWRAP_REAL |
static Constant |
VOID |
static Global |
WRAP_INT |
static Global |
WRAP_REAL |
VOID_ASSIGNMENTS| Modifier and Type | Method and Description |
|---|---|
void |
compile(Compiler compiler)
This method compiles this expression in the context of the specified
Compiler.
|
Expression |
copy()
Returns a deep copy of this expression.
|
boolean |
equals(java.lang.Object other) |
static Constant |
FALSE() |
static void |
initialize(Tables tables)
Initialization of some constants.
|
boolean |
isFalse()
Returns true iff this expression denotes the constant false.
|
boolean |
isNull()
Returns true iff this expression denotes the constant null.
|
boolean |
isTrue()
Returns true iff this expression denotes the constant true.
|
static Constant |
NULL() |
static Constant |
NULL(Type type) |
void |
setCheckedType()
This method sets the final unambiguously checked type of this expression, possibly
along with other final information that may be needed by the compiler for
generating code.
|
Constant |
setIsNull() |
java.lang.String |
toString() |
static Constant |
TRUE() |
void |
typeCheck(TypeChecker typeChecker)
This method type-checks this expression in the context of the specified
TypeChecker.
|
Expression |
typedCopy()
Returns a deep copy of this expression this and all its subexpressions share the
same type as their copy's counterparts.
|
checkedType, setCheckedType, setType, type, typeRefaddType, addTypes, boxSort, containsFreeName, enclosingScope, extent, getEnd, getStart, isConstant, isEquality, isHiddenSlicing, isSelector, isSlicing, isVoid, locationString, numberOfSubexpressions, otherTypes, parameters, sanitizeNames, sanitizeSorts, setCheckedTypeLocked, setEnd, setExtent, setOtherTypes, setStart, setSubexpression, shiftOffsets, shiftOffsets, sort, subexpression, substitute, typeCheck, typeCheck, typeCheckLockedpublic static final Constant VOID
public static Global WRAP_INT
public static Global UNWRAP_INT
public static Global WRAP_REAL
public static Global UNWRAP_REAL
public Constant()
public Constant(Type type)
public final Expression copy()
Expressioncopy in class Expressionpublic final Expression typedCopy()
ExpressiontypedCopy in class Expressionpublic static final Constant TRUE()
public final boolean isTrue()
ExpressionisTrue in class Expressionpublic static final Constant FALSE()
public final boolean isFalse()
ExpressionisFalse in class Expressionpublic static final Constant NULL()
public final Constant setIsNull()
public final boolean isNull()
ExpressionisNull in class Expressionpublic static final void initialize(Tables tables)
public final void setCheckedType()
ExpressionsetCheckedType in class Expressionpublic void typeCheck(TypeChecker typeChecker) throws TypingErrorException
ExpressiontypeCheck in class ExpressionTypingErrorExceptionpublic void compile(Compiler compiler)
Expressioncompile in class Expressionpublic boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object