From 28981268a4eb93bba918eb29ecf57de64d4b0eff Mon Sep 17 00:00:00 2001 From: Chimrod <> Date: Sat, 14 Oct 2023 18:36:46 +0200 Subject: Applied this new way to check the errors in the main code --- bin/qsp_parser.ml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'bin/qsp_parser.ml') diff --git a/bin/qsp_parser.ml b/bin/qsp_parser.ml index 8f4cf26..93f44f4 100644 --- a/bin/qsp_parser.ml +++ b/bin/qsp_parser.ml @@ -16,13 +16,22 @@ let filter_report : Args.filters -> Report.t list -> Report.t -> Report.t list = type ctx = { error_nb : int; warn_nb : int; debug_nb : int } +(* + List all the controls to apply + *) +let _, _, _, e1 = Qsp_syntax.Check.build (module Qsp_syntax.Type_of) + +module Check = Qsp_syntax.Check.Make (struct + let t = [| e1 |] +end) + (** Read the source file until getting a report (the whole location has been read properly), or until the first syntax error. *) let parse_location : ctx:ctx -> Qparser.Lexbuf.t -> Args.filters -> ctx = fun ~ctx lexbuf filters -> let result = - Qparser.Analyzer.parse (module Qsp_syntax.Type_of) lexbuf + Qparser.Analyzer.parse (module Check) lexbuf |> Result.map (fun (_, f) -> List.fold_left f ~init:[] ~f:(filter_report filters)) in -- cgit v1.2.3