aboutsummaryrefslogtreecommitdiff
path: root/lib/qparser/lexer.ml
diff options
context:
space:
mode:
Diffstat (limited to 'lib/qparser/lexer.ml')
-rw-r--r--lib/qparser/lexer.ml9
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/qparser/lexer.ml b/lib/qparser/lexer.ml
index c643577..3e1c05b 100644
--- a/lib/qparser/lexer.ml
+++ b/lib/qparser/lexer.ml
@@ -4,7 +4,7 @@
open Tokens
-exception UnclosedQuote of { content : string; line : int }
+exception UnclosedQuote
exception LexError of Lexing.position * string
exception EOF
@@ -29,13 +29,10 @@ let wait_balance : (Buffer.t -> Lexbuf.t -> 'a) -> Lexbuf.t -> 'a =
let _, position = Lexbuf.positions lexbuf in
Lexbuf.set_start_position lexbuf position;
- try[@warning "-52"]
+ try
let token = rule (Buffer.create 256) lexbuf in
token
- with Failure "lexing: empty token" ->
- let position, _ = Lexbuf.positions lexbuf in
- let line = position.Lexing.pos_lnum and content = Lexbuf.content lexbuf in
- (raise (UnclosedQuote { line; content }) [@warning "+52"])
+ with Not_found -> raise UnclosedQuote
let space = [%sedlex.regexp? ' ' | '\t']
let eol = [%sedlex.regexp? '\r' | '\n' | "\r\n"]