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