public class Sequence extends Expression
VOID_ASSIGNMENTS| Constructor and Description |
|---|
Sequence(java.util.AbstractList expressions)
Constructs a sequence with the specified list of expressions.
|
Sequence(Expression[] expressions) |
Sequence(Expression fst,
Expression snd) |
| Modifier and Type | Method and Description |
|---|---|
Type |
checkedType()
The checked type of a sequence of expressions is that of the last one.
|
void |
compile(Compiler compiler)
Compiles this sequence of expressions in the context of the specified
Compiler.
|
Expression |
copy()
Returns a deep copy of this expression.
|
int |
numberOfSubexpressions()
Returns the number of subexpressions
|
void |
setCheckedType()
Sets the checked Type of all expressions of this sequence.
|
void |
setCheckedType(Type type)
No-op...
|
Expression |
setSubexpression(int n,
Expression expression)
Returns this expression after setting its n-th subexpression to the specified
expression; if there is no subexpression at the given position, this throws a
NoSuchSubexpressionException
|
void |
setType(Type type)
No-op...
|
Expression |
subexpression(int n)
Returns the n-th subexpression of this expression; if there is no subexpression
at the given position, this throws a NoSuchSubexpressionException
|
java.lang.String |
toString() |
Type |
type()
The type of a sequence of expressions is that of the last one.
|
void |
typeCheck(TypeChecker typeChecker)
Type-checks all expressions in this sequence 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.
|
Type |
typeRef()
The type reference of a sequence of expressions is that of the last one.
|
addType, addTypes, boxSort, containsFreeName, enclosingScope, extent, getEnd, getStart, isConstant, isEquality, isFalse, isHiddenSlicing, isNull, isSelector, isSlicing, isTrue, isVoid, locationString, otherTypes, parameters, sanitizeNames, sanitizeSorts, setCheckedTypeLocked, setEnd, setExtent, setOtherTypes, setStart, shiftOffsets, shiftOffsets, sort, substitute, typeCheck, typeCheck, typeCheckLockedpublic Sequence(java.util.AbstractList expressions)
public Sequence(Expression[] expressions)
public Sequence(Expression fst, Expression snd)
public Expression copy()
Expressioncopy in class Expressionpublic Expression typedCopy()
ExpressiontypedCopy in class Expressionpublic final int numberOfSubexpressions()
ExpressionnumberOfSubexpressions in class Expressionpublic final Expression subexpression(int n) throws NoSuchSubexpressionException
Expressionsubexpression in class ExpressionNoSuchSubexpressionExceptionpublic final Expression setSubexpression(int n, Expression expression) throws NoSuchSubexpressionException
ExpressionsetSubexpression in class ExpressionNoSuchSubexpressionExceptionpublic final Type type()
type in class Expressionpublic final void setType(Type type)
setType in class Expressionpublic final Type typeRef()
typeRef in class Expressionpublic final Type checkedType()
checkedType in class Expressionpublic final void setCheckedType()
setCheckedType in class Expressionpublic final void setCheckedType(Type type)
setCheckedType in class Expressionpublic final void typeCheck(TypeChecker typeChecker) throws TypingErrorException
typeCheck in class ExpressionTypingErrorExceptionpublic void compile(Compiler compiler)
compile in class Expressionpublic final java.lang.String toString()
toString in class java.lang.Object