aboutsummaryrefslogtreecommitdiff
path: root/lib/lexer.ml
diff options
context:
space:
mode:
authorChimrod <>2023-09-29 09:27:22 +0200
committerChimrod <>2023-09-29 10:00:21 +0200
commit1f79e8f1f0f59748497665ccee544163c5136562 (patch)
treeeacf55e9a2b5b8ace25d3f118f9b749ae9b53dbc /lib/lexer.ml
parent5e0b521a2ccce4bd19cf5d08176616f760180c11 (diff)
Fixed a wrong location for string
Diffstat (limited to 'lib/lexer.ml')
-rw-r--r--lib/lexer.ml3
1 files changed, 3 insertions, 0 deletions
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