From c2f87ff1e6e5676968804cd50b86fc2f0f9ad672 Mon Sep 17 00:00:00 2001 From: Chimrod <> Date: Sat, 7 Oct 2023 12:24:37 +0200 Subject: Made explicit the use of the report in the parser --- test/syntax_error.ml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'test/syntax_error.ml') diff --git a/test/syntax_error.ml b/test/syntax_error.ml index fed43a7..d395dba 100644 --- a/test/syntax_error.ml +++ b/test/syntax_error.ml @@ -1,23 +1,24 @@ module Parser = Qparser.Parser.Make (Qsp_syntax.Tree) module Ast = Qsp_syntax.Tree.Ast +module S = Qsp_syntax.S let _position = (Lexing.dummy_pos, Lexing.dummy_pos) type 'a report = { level : Qsp_syntax.Report.level; loc : 'a; message : string } [@@deriving eq, show] -let report : Ast.pos report Alcotest.testable = +let report : S.pos report Alcotest.testable = let equal = equal_report (fun _ _ -> true) in let pp = pp_report (fun formater _ -> Format.fprintf formater "_position") in Alcotest.testable pp equal let get_report : - (Ast.pos Syntax.location, Qsp_syntax.Report.t) result -> Ast.pos report = + (S.pos Syntax.location, Qsp_syntax.Report.t) result -> S.pos report = function | Ok _ -> failwith "No error" | Error { level; loc; message } -> { level; loc; message } -let _test_instruction : string -> Ast.pos report -> unit = +let _test_instruction : string -> S.pos report -> unit = fun literal expected -> let _location = Printf.sprintf {|# Location %s -- cgit v1.2.3