diff options
author | Chimrod <> | 2023-09-27 15:36:13 +0200 |
---|---|---|
committer | Chimrod <> | 2023-09-29 10:00:21 +0200 |
commit | 5dc0c5defdd7ebb152a00e8b2895787b54931779 (patch) | |
tree | 78f9d7c646d3c614a6c934778b195e0707f47821 /lib/interpreter.ml | |
parent | 40f7b4c7398db2b832b71e3dfb8afb53116fad51 (diff) |
Allow differents file encoding for the source
Diffstat (limited to 'lib/interpreter.ml')
-rw-r--r-- | lib/interpreter.ml | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/lib/interpreter.ml b/lib/interpreter.ml index 21c1430..346ceb5 100644 --- a/lib/interpreter.ml +++ b/lib/interpreter.ml @@ -11,20 +11,22 @@ type error_code = InvalidSyntax | MenhirCode of int -type error = { - code : error_code; - start_pos : Lexing.position; - end_pos : Lexing.position; -} - module Interpreter (MI : MenhirLib.IncrementalEngine.INCREMENTAL_ENGINE) = struct + type error = { + code : error_code; + start_pos : Lexing.position; + end_pos : Lexing.position; + + } + module E = MenhirLib.ErrorReports module L = MenhirLib.LexerUtil type step = MI.token * Lexing.position * Lexing.position - let range_message (start_pos, end_pos) code = { code; start_pos; end_pos } + let range_message (start_pos, end_pos) : error_code -> error = + fun code -> { code; start_pos; end_pos } let get_parse_error lexbuf env : error = match MI.stack env with |