|
||||||||||
| 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 DeclarationTIRs 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 ILetETIRpublic java.util.List<? extends DeclarationTIR> getDeclarations()
getDeclarations in interface ILetETIRpublic SymbolTable<HobbesType> getTypeTable()
public void setTypeTable(SymbolTable<HobbesType> typeTable)
public HobbesType getType()
ExpressionTIR
getType in interface ExpressionTIRpublic <T> T accept(ExpressionTIRVisitor<T> visitor)
ExpressionTIRExpressionTIRVisitor.
accept in interface ExpressionTIRvisitor - the visitor object.
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic IPosition getPosition()
getPosition in interface HobbesTIR
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||