end of prac 4
This commit is contained in:
parent
dc5f17620e
commit
b2882bf8f7
@ -588,6 +588,14 @@ public class ConstantFolder implements ActualParameterVisitor<Void, AbstractSynt
|
|||||||
|
|
||||||
if (o.decl == StdEnvironment.addDecl) {
|
if (o.decl == StdEnvironment.addDecl) {
|
||||||
foldedValue = int1 + int2;
|
foldedValue = int1 + int2;
|
||||||
|
} else if(o.decl == StdEnvironment.multiplyDecl) {
|
||||||
|
foldedValue = int1 * int2;
|
||||||
|
} else if(o.decl == StdEnvironment.subtractDecl) {
|
||||||
|
foldedValue = int1 - int2;
|
||||||
|
} else if(o.decl == StdEnvironment.moduloDecl) {
|
||||||
|
foldedValue = int1 % int2;
|
||||||
|
} else if(o.decl == StdEnvironment.divideDecl) {
|
||||||
|
foldedValue = int1 / int2;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (foldedValue instanceof Integer) {
|
if (foldedValue instanceof Integer) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user