From 75f3eabb46eded01460f7700a75d094100047438 Mon Sep 17 00:00:00 2001 From: Chimrod <> Date: Sat, 14 Dec 2024 23:06:12 +0100 Subject: Added dynamic check mecanism --- test/syntax.ml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'test/syntax.ml') diff --git a/test/syntax.ml b/test/syntax.ml index db449b1..ff5a3ca 100644 --- a/test/syntax.ml +++ b/test/syntax.ml @@ -4,7 +4,8 @@ module Check = Qsp_checks.Check module S = Qsp_syntax.S module T = Qsp_syntax.T -let location_id, e1 = Qsp_syntax.Catalog.build (module Tree) +let location_id = Type.Id.make () +let e1 = Qsp_syntax.Catalog.build ~location_id (module Tree) module Parser = Check.Make (struct let t = [| e1 |] @@ -28,7 +29,9 @@ let parse : string -> (S.pos location, Qsp_syntax.Report.t) result = Sedlexing.Latin1.from_string content |> Qparser.Lexbuf.from_lexbuf in let context = Parser.initialize () in - Qparser.Analyzer.parse (module Parser) lexing context + Qparser.Analyzer.parse + (module Parser) + Qparser.Analyzer.Location lexing context |> Result.map (fun v -> (* Uncatched excteptions here, but we are in the tests… If it’s fail here I have an error in the code. *) -- cgit v1.2.3