|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.norecess.citkit.tir.expressions.LetETIR
public class LetETIR
The TIR for a let expression. A let expression is used to declared new
variables in a new scope. The list of DeclarationTIR
s should be a
list of variables, types, and functions declared in one new scope.
If using an ExpressionTIRVisitor
to process a LetETIR
, it is
useful to implement DeclarationTIRVisitor
to process the declarations
for the new scope.
Constructor Summary | |
---|---|
LetETIR(IPosition position,
java.util.List<? extends DeclarationTIR> declarations,
ExpressionTIR body)
Constructs a let expression. |
|
LetETIR(java.util.List<? extends DeclarationTIR> declarations,
ExpressionTIR body)
Basic constructor. |
Method Summary | ||
---|---|---|
|
accept(ExpressionTIRVisitor<T> visitor)
Implements the visitor pattern with ExpressionTIRVisitor . |
|
boolean |
equals(java.lang.Object o)
|
|
ExpressionTIR |
getBody()
Returns the body of the let expression. |
|
java.util.List<? extends DeclarationTIR> |
getDeclarations()
Returns the declarations of the let expression. |
|
IPosition |
getPosition()
Retrieves the position of the code that generated the TIR. |
|
HobbesType |
getType()
Retrieves the type of the expression. |
|
SymbolTable<HobbesType> |
getTypeTable()
|
|
int |
hashCode()
|
|
void |
setTypeTable(SymbolTable<HobbesType> typeTable)
|
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public LetETIR(IPosition position, java.util.List<? extends DeclarationTIR> declarations, ExpressionTIR body)
position
- the position of the let expression in the source code.declarations
- the declarations of the let expression.body
- the body of the let expression.public LetETIR(java.util.List<? extends DeclarationTIR> declarations, ExpressionTIR body)
declarations
- the declarations.body
- the body.Method Detail |
---|
public ExpressionTIR getBody()
getBody
in interface ILetETIR
public java.util.List<? extends DeclarationTIR> getDeclarations()
getDeclarations
in interface ILetETIR
public SymbolTable<HobbesType> getTypeTable()
public void setTypeTable(SymbolTable<HobbesType> typeTable)
public HobbesType getType()
ExpressionTIR
getType
in interface ExpressionTIR
public <T> T accept(ExpressionTIRVisitor<T> visitor)
ExpressionTIR
ExpressionTIRVisitor
.
accept
in interface ExpressionTIR
visitor
- the visitor object.
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public IPosition getPosition()
getPosition
in interface HobbesTIR
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |