aboutsummaryrefslogtreecommitdiff
path: root/lib/syntax/t.ml
diff options
context:
space:
mode:
Diffstat (limited to 'lib/syntax/t.ml')
-rw-r--r--lib/syntax/t.ml7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/syntax/t.ml b/lib/syntax/t.ml
index 7186275..38ad5b0 100644
--- a/lib/syntax/t.ml
+++ b/lib/syntax/t.ml
@@ -2,8 +2,15 @@
This module contains the basic operators used in the QSP syntax.
*)
+open StdLabels
+
type 'a literal = Text of string | Expression of 'a list
+let map_litteral : f:('a -> 'b) -> 'a literal -> 'b literal =
+ fun ~f -> function
+ | Text t -> Text t
+ | Expression e -> Expression (List.map ~f e)
+
type boperator =
| Eq
| Neq