From a6b5a6bdd138a5ccc6827bcc73580df1e9218820 Mon Sep 17 00:00:00 2001 From: Sébastien Dailly Date: Fri, 24 Nov 2017 09:22:24 +0100 Subject: Moved all the code to src directory --- src/expression.mli | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100755 src/expression.mli (limited to 'src/expression.mli') diff --git a/src/expression.mli b/src/expression.mli new file mode 100755 index 0000000..8cab479 --- /dev/null +++ b/src/expression.mli @@ -0,0 +1,29 @@ +type t = + | Basic: 'a ScTypes.types -> t (** A direct type *) + | Formula: formula -> t (** A formula *) + | Undefined: t (** The content is not defined *) + +and formula = + | Expression of ScTypes.expression (** A valid expression *) + | Error of int * UTF8.t (** When the expression cannot be parsed *) + + +(** Load an expression *) +val load: UTF8.t -> t + +val load_expr: t -> t + +val is_defined: t -> bool + +(** Evaluate the expression *) +val eval: t -> (ScTypes.refs -> ScTypes.result option ScTypes.Refs.range) -> ScTypes.result + +(** Collect all the cell referenced in the expression *) +val collect_sources: t -> Cell.Set.t + +(** Represent an expression *) +val show: t -> UTF8.t + +val shift: (int * int) -> t -> t + +val (=): t -> t -> bool -- cgit v1.2.3