From 1f79e8f1f0f59748497665ccee544163c5136562 Mon Sep 17 00:00:00 2001 From: Chimrod <> Date: Fri, 29 Sep 2023 09:27:22 +0200 Subject: Fixed a wrong location for string --- lib/lexer.ml | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/lexer.ml') diff --git a/lib/lexer.ml b/lib/lexer.ml index a91bfdb..7014d85 100644 --- a/lib/lexer.ml +++ b/lib/lexer.ml @@ -59,6 +59,9 @@ let incr_level lexbuf = let wait_balance : (Buffer.t -> Lexbuf.t -> 'a) -> Lexbuf.t -> 'a = fun rule lexbuf -> + let _, position = Lexbuf.positions lexbuf in + Lexbuf.set_start_position lexbuf position; + try[@warning "-52"] let token = rule (Buffer.create 256) lexbuf in token -- cgit v1.2.3