aboutsummaryrefslogtreecommitdiff
path: root/lib/syntax/t.ml
diff options
context:
space:
mode:
authorChimrod <>2023-11-08 16:30:02 +0100
committerChimrod <>2023-11-09 13:12:45 +0100
commitebf072326e2315ace952c80dbc442198c44faf7d (patch)
tree7f527035eb0627d634768246a0d14e1821d1bdc4 /lib/syntax/t.ml
parent1e182dca2972fbd29e50f611dbf12eb28d6cdd95 (diff)
Added a way to compose a test with another one
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