From 1aaf8ae4d48bb9404b8faef2ba55024a6d6bac23 Mon Sep 17 00:00:00 2001 From: Chimrod <> Date: Fri, 22 Sep 2023 18:19:02 +0200 Subject: Made the syntax analyzer generic --- lib/analyzer.mli | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 lib/analyzer.mli (limited to 'lib/analyzer.mli') diff --git a/lib/analyzer.mli b/lib/analyzer.mli new file mode 100644 index 0000000..3032375 --- /dev/null +++ b/lib/analyzer.mli @@ -0,0 +1,12 @@ +type error = { + message : string; + start_pos : Lexing.position; + end_pos : Lexing.position; +} + +val format_error : Format.formatter -> error -> unit + +val parse : + (module Qsp_syntax.S.Analyzer with type Location.repr = 'a) -> + Lexing.lexbuf -> + ('a, error) Result.t -- cgit v1.2.3