aboutsummaryrefslogtreecommitdiff
path: root/src/expression.ml
diff options
context:
space:
mode:
authorSébastien Dailly <sebastien@chimrod.com>2018-08-02 19:44:49 +0200
committerSébastien Dailly <sebastien@chimrod.com>2018-08-02 19:44:49 +0200
commitc20b6dd7533775eaed045950e04175b020ac52c4 (patch)
tree3b61fbfecd8d161808fb22b4c7f9b213335f9072 /src/expression.ml
parenta0ea857685804735d60f19a166274745d8785e62 (diff)
Update expression evaluation
Diffstat (limited to 'src/expression.ml')
-rw-r--r--[-rwxr-xr-x]src/expression.ml7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/expression.ml b/src/expression.ml
index 7a38a49..c2e4ec8 100755..100644
--- a/src/expression.ml
+++ b/src/expression.ml
@@ -87,10 +87,11 @@ end
module EvalSources = ScTypes.Expr.Eval(Collect_sources)
let collect_sources = begin function
- | Formula (Expression f) -> EvalSources.eval f () Cell.Set.empty
+ | Formula (Expression f) -> EvalSources.eval f Cell.Set.empty
| _ -> Cell.Set.empty
end
+module Shifter = ScTypes.Expr.Eval(Shift_expr)
module Printer = ScTypes.Expr.Eval(Show_expr.Show_Expr(Show_ref)(Show_type))
(** Inherit the default representation, but print the float with all decimals *)
@@ -117,7 +118,7 @@ let show e =
begin match e with
| Formula (Expression f) ->
UTF8.Buffer.add_char buffer '=';
- Printer.eval f () buffer
+ Printer.eval f buffer
| Basic b -> LongPrinter.eval b buffer
| Formula (Error (i,s)) -> UTF8.Buffer.add_string buffer s
| Undefined -> ()
@@ -125,7 +126,7 @@ let show e =
UTF8.Buffer.contents buffer
let shift vector = function
- | Formula (Expression f) -> Formula (Expression (ScTypes.Expr.shift_exp vector f))
+ | Formula (Expression f) -> Formula (Expression (Shifter.eval f vector))
| other -> other
let (=) t1 t2 = match t1, t2 with