aboutsummaryrefslogtreecommitdiff
path: root/lib/analyzer.ml
diff options
context:
space:
mode:
Diffstat (limited to 'lib/analyzer.ml')
-rw-r--r--lib/analyzer.ml10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/analyzer.ml b/lib/analyzer.ml
index fe6ae90..b422b24 100644
--- a/lib/analyzer.ml
+++ b/lib/analyzer.ml
@@ -23,17 +23,21 @@ let format_error : Format.formatter -> error -> unit =
*)
let parse :
(module Qsp_syntax.S.Analyzer with type Location.repr = 'a) ->
+ (module Encoding.S) ->
Sedlexing.lexbuf ->
('a, error) Result.t =
- fun (type a) (module S : Qsp_syntax.S.Analyzer with type Location.repr = a) ->
+ fun (type a) (module S : Qsp_syntax.S.Analyzer with type Location.repr = a)
+ (module E : Encoding.S) ->
let module Parser = Parser.Make (S) in
let module IncrementalParser =
Interpreter.Interpreter (Parser.MenhirInterpreter) in
fun lexbuf ->
- IncrementalParser.of_lexbuf lexbuf UTF16.lexer Parser.Incremental.main
+ IncrementalParser.of_lexbuf lexbuf
+ (UTF16.lexer (module E))
+ Parser.Incremental.main
|> Result.map_error (fun e ->
let message =
- match e.Interpreter.code with
+ match e.IncrementalParser.code with
| Interpreter.InvalidSyntax -> "Invalid Syntax"
| Interpreter.MenhirCode c ->
String.concat ""