remove debugging related code

This commit is contained in:
Mylloon 2023-10-25 10:01:23 +02:00
parent 899dae5ea1
commit b06572a5ca
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -9,13 +9,8 @@
f lexbuf f lexbuf
;; ;;
let error lexbuf c = let error lexbuf =
let msg = let msg = "during lexing"
"during lexing"
^
match c with
| Some c -> Printf.sprintf " at `%c`" c
| None -> ""
in in
error msg (lex_join lexbuf.lex_start_p lexbuf.lex_curr_p) error msg (lex_join lexbuf.lex_start_p lexbuf.lex_curr_p)
;; ;;
@ -43,7 +38,7 @@
let ascii_code = int_of_string caractere in let ascii_code = int_of_string caractere in
Char.chr ascii_code Char.chr ascii_code
with with
| _ -> error lexbuf None err_msg)) | _ -> error lexbuf err_msg))
;; ;;
} }
@ -190,8 +185,8 @@ rule token = parse
(** Lexing errors *) (** Lexing errors *)
(* Erreur qui advient quand un code ASCII est trop grand *) (* Erreur qui advient quand un code ASCII est trop grand *)
| "'" ascii_trop_grand "'" { error lexbuf None "" } | "'" ascii_trop_grand "'" { error lexbuf "" }
| _ as _c { error lexbuf None (* (Some _c) *) err_msg } | _ { error lexbuf err_msg }
and commentary nest = parse and commentary nest = parse
(* Support nesting *) (* Support nesting *)
@ -200,7 +195,7 @@ and commentary nest = parse
| open_comment { commentary (nest + 1) lexbuf } | open_comment { commentary (nest + 1) lexbuf }
(** Error *) (** Error *)
| eof { error lexbuf None "unclosed commentary." } | eof { error lexbuf "unclosed commentary." }
(** Commentary content *) (** Commentary content *)
| newline { next_line_and (commentary nest) lexbuf } | newline { next_line_and (commentary nest) lexbuf }
@ -225,4 +220,4 @@ and read_string buffer = parse
; read_string buffer lexbuf } ; read_string buffer lexbuf }
(** Error *) (** Error *)
| eof { error lexbuf None "Unterminated string." } | eof { error lexbuf "Unterminated string." }