public class TupleProjection extends ProtoExpression
VOID_ASSIGNMENTS| Constructor and Description |
|---|
TupleProjection(Expression tuple,
Constant field) |
TupleProjection(Expression tuple,
int position) |
TupleProjection(Expression tuple,
java.lang.String field) |
| 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.
|
int |
depth() |
Constant |
field() |
int |
numberOfSubexpressions()
Returns the number of subexpressions
|
int |
offset() |
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.
|
void |
setPosition(java.lang.String field) |
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
|
boolean |
slicesParameter(Parameter parameter)
Returns true iff this is of the form x.p1.p2.....pk where
x is a dummy occurrence of the specified parameter.
|
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() |
Expression |
tuple() |
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, isFalse, isHiddenSlicing, isNull, isSelector, isSlicing, isTrue, isVoid, locationString, otherTypes, parameters, sanitizeNames, sanitizeSorts, setCheckedTypeLocked, setEnd, setExtent, setOtherTypes, setStart, shiftOffsets, shiftOffsets, sort, substitute, typeCheck, typeCheck, typeCheckLockedpublic TupleProjection(Expression tuple, Constant field)
public TupleProjection(Expression tuple, int position)
public TupleProjection(Expression tuple, java.lang.String field)
public final Expression copy()
Expressioncopy in class Expressionpublic final Expression typedCopy()
ExpressiontypedCopy in class Expressionpublic final Expression tuple()
public final Constant field()
public 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 boolean slicesParameter(Parameter parameter)
public final int depth()
public final void setCheckedType()
ExpressionsetCheckedType in class Expressionpublic final void setPosition(java.lang.String field)
public final void typeCheck(TypeChecker typeChecker) throws TypingErrorException
ExpressiontypeCheck in class ExpressionTypingErrorExceptionpublic final void compile(Compiler compiler)
Expressioncompile in class Expressionpublic final int offset()
public final java.lang.String toString()
toString in class java.lang.Object