aboutsummaryrefslogtreecommitdiff
path: root/lib/analysers/filters.ml
diff options
context:
space:
mode:
Diffstat (limited to 'lib/analysers/filters.ml')
-rw-r--r--lib/analysers/filters.ml20
1 files changed, 14 insertions, 6 deletions
diff --git a/lib/analysers/filters.ml b/lib/analysers/filters.ml
index 7044798..6b1d843 100644
--- a/lib/analysers/filters.ml
+++ b/lib/analysers/filters.ml
@@ -5,15 +5,23 @@ module Expression = ImportExpression
open StdLabels
(** Add a list of expressions into the group *)
-let rec add_filters :
+let add_filters :
conf:ImporterSyntax.t -> Chunk.t -> Path.t Expression.T.t list -> unit =
fun ~conf group -> function
| [] -> ()
- | hd :: [] -> Chunk.add_expression ~conf group hd
- | hd :: tl ->
- Chunk.add_expression ~conf group hd;
- Chunk.add_string group "\nAND ";
- add_filters ~conf group tl
+ | any ->
+ let rec f ~conf group = function
+ | [] -> ()
+ | hd :: [] ->
+ Chunk.add_expression ~conf group hd;
+ Chunk.add_string group ")"
+ | hd :: tl ->
+ Chunk.add_expression ~conf group hd;
+ Chunk.add_string group ")\nAND (";
+ f ~conf group tl
+ in
+ Chunk.add_string group "(";
+ f ~conf group any
type 'a cte_acc = {
n : int;