m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/pl/edu
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/pl/edu')
-rw-r--r--src/main/java/pl/edu/mimuw/cloudatlas/interpreter/Interpreter.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/main/java/pl/edu/mimuw/cloudatlas/interpreter/Interpreter.java b/src/main/java/pl/edu/mimuw/cloudatlas/interpreter/Interpreter.java
index 4634459..71a300b 100644
--- a/src/main/java/pl/edu/mimuw/cloudatlas/interpreter/Interpreter.java
+++ b/src/main/java/pl/edu/mimuw/cloudatlas/interpreter/Interpreter.java
@@ -368,8 +368,13 @@ public class Interpreter {
}
public Result visit(BasicExprMulC expr, Environment env) {
- // TODO
- throw new UnsupportedOperationException("Not yet implemented");
+ try {
+ Result left = expr.basicexpr_1.accept(new BasicExprInterpreter(), env);
+ Result right = expr.basicexpr_2.accept(new BasicExprInterpreter(), env);
+ return left.multiply(right);
+ } catch(Exception exception) {
+ throw new InsideQueryException(PrettyPrinter.print(expr), exception);
+ }
}
public Result visit(BasicExprDivC expr, Environment env) {