aboutsummaryrefslogtreecommitdiff
path: root/test/qsp_parser_test.ml
diff options
context:
space:
mode:
authorChimrod <>2023-09-29 19:06:41 +0200
committerChimrod <>2023-09-29 19:10:04 +0200
commit2e41a214e4c2a2984ad3b2afa3d80178d227927f (patch)
tree5c02005d6bec087a455f840f766de482fb6cf66d /test/qsp_parser_test.ml
parent7f93c2a6b351c02e506d521ea7363f813618e430 (diff)
Added a global line counter (off by default)
Diffstat (limited to 'test/qsp_parser_test.ml')
-rw-r--r--test/qsp_parser_test.ml5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/qsp_parser_test.ml b/test/qsp_parser_test.ml
index d827099..652ef75 100644
--- a/test/qsp_parser_test.ml
+++ b/test/qsp_parser_test.ml
@@ -10,8 +10,9 @@ type 'a location = 'a * 'a Ast.statement list [@@deriving eq, show]
(** Run the parser with the given expression and return the result *)
let parse : string -> T.pos location =
fun content ->
- let lexing = Sedlexing.Latin1.from_string content in
-
+ let lexing =
+ Sedlexing.Latin1.from_string content |> Qparser.Lexbuf.from_lexbuf
+ in
match Qparser.Analyzer.parse (module Qsp_syntax.Tree) lexing with
| Ok e -> e
| Error e ->