Removed dependency of ParserLog upon EvalOpt.
This commit is contained in:
parent
c7503e3285
commit
cc4138fc2c
@ -6,8 +6,12 @@ open! Region
|
||||
|
||||
let printf = Printf.printf
|
||||
|
||||
let offsets = ref true
|
||||
|
||||
let mode = ref `Point
|
||||
|
||||
let compact (region: Region.t) =
|
||||
region#compact ~offsets:EvalOpt.offsets EvalOpt.mode
|
||||
region#compact ~offsets:!offsets !mode
|
||||
|
||||
let print_nsepseq :
|
||||
string -> ('a -> unit) -> ('a, Region.t) nsepseq -> unit =
|
||||
|
@ -1,5 +1,8 @@
|
||||
(* Printing the AST *)
|
||||
|
||||
val offsets : bool ref
|
||||
val mode : [`Byte | `Point] ref
|
||||
|
||||
val print_tokens : AST.t -> unit
|
||||
|
||||
val print_path : AST.path -> unit
|
||||
|
@ -91,7 +91,11 @@ let () =
|
||||
try
|
||||
let ast = Parser.contract tokeniser buffer in
|
||||
if Utils.String.Set.mem "ast" EvalOpt.verbose
|
||||
then ParserLog.print_tokens ast
|
||||
then begin
|
||||
ParserLog.offsets := EvalOpt.offsets;
|
||||
ParserLog.mode := EvalOpt.mode;
|
||||
ParserLog.print_tokens ast
|
||||
end
|
||||
with
|
||||
Lexer.Error err ->
|
||||
close_all ();
|
||||
|
Loading…
Reference in New Issue
Block a user