From 07cb010ccd29a586c992ab76c81934979ba1a755 Mon Sep 17 00:00:00 2001
From: Chimrod <>
Date: Thu, 7 Dec 2023 18:40:48 +0100
Subject: Removed debug messages

---
 lib/qparser/lex_state.ml |  9 +--------
 lib/qparser/lexer.ml     | 17 +++--------------
 2 files changed, 4 insertions(+), 22 deletions(-)

(limited to 'lib/qparser')

diff --git a/lib/qparser/lex_state.ml b/lib/qparser/lex_state.ml
index 3cf757d..4b102b8 100644
--- a/lib/qparser/lex_state.ml
+++ b/lib/qparser/lex_state.ml
@@ -4,11 +4,6 @@
 
 exception Out_of_context
 
-let pr_err buffer =
-  let location, _ = Lexbuf.positions buffer in
-  let line = location.Lexing.pos_lnum and file = location.Lexing.pos_fname in
-  Format.eprintf "Error found at : %s:%d\n" file line
-
 let space = [%sedlex.regexp? ' ' | '\t']
 let spaces = [%sedlex.regexp? Plus space]
 let single_quote = [%sedlex.regexp? '\'']
@@ -108,9 +103,7 @@ and quotedStringWraper : Lexbuf.stringWraper =
         | single_quote ->
             Lexbuf.leave_state buffer;
             TEXT_MARKER
-        | _ ->
-            pr_err buffer;
-            raise Not_found);
+        | _ -> raise Not_found);
   }
 
 and dQuotedStringWraper : Lexbuf.stringWraper =
diff --git a/lib/qparser/lexer.ml b/lib/qparser/lexer.ml
index b133a8e..a1dbba1 100644
--- a/lib/qparser/lexer.ml
+++ b/lib/qparser/lexer.ml
@@ -9,11 +9,6 @@ exception UnclosedQuote
 exception LexError of string
 exception EOF
 
-let pr_err buffer =
-  let location, _ = Lexbuf.positions buffer in
-  let line = location.Lexing.pos_lnum and file = location.Lexing.pos_fname in
-  Format.eprintf "read_quoted_string : %s:%d\n" file line
-
 (* Extract the location name from the pattern *)
 let location_name = Str.regexp {|.* \(.*\)|}
 
@@ -109,9 +104,7 @@ let rec read_long_string ?(nested = false) level buf buffer =
   | any ->
       Buffer.add_string buf (Lexbuf.content buffer);
       read_long_string ~nested level buf buffer
-  | _ ->
-      pr_err buffer;
-      raise Not_found
+  | _ -> raise Not_found
 
 (** Read the text inside a ['] *)
 let rec read_quoted_string : Lexbuf.stringWraper -> Lexbuf.buffer_builder =
@@ -135,9 +128,7 @@ let rec read_quoted_string : Lexbuf.stringWraper -> Lexbuf.buffer_builder =
   | eol | any ->
       Buffer.add_string buf (Lexbuf.content buffer);
       (f.wrap (read_quoted_string f)) buf buffer
-  | _ ->
-      pr_err buffer;
-      raise Not_found
+  | _ -> raise Not_found
 
 let rec skip_comment buffer =
   (* Simplified way to skip the content of a string until the end marker.
@@ -177,9 +168,7 @@ let rec skip_comment buffer =
       Lexbuf.rollback buffer;
       COMMENT
   | any -> skip_comment buffer
-  | _ ->
-      pr_err buffer;
-      raise Not_found
+  | _ -> raise Not_found
 
 (** Main lexer *)
 let rec parse_token : Lexbuf.t -> token =
-- 
cgit v1.2.3