aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/flags.ml8
-rw-r--r--lib/flags.mli5
2 files changed, 13 insertions, 0 deletions
diff --git a/lib/flags.ml b/lib/flags.ml
index da80130283..971b560ec2 100644
--- a/lib/flags.ml
+++ b/lib/flags.ml
@@ -37,6 +37,14 @@ let raw_print = ref false
let unicode_syntax = ref false
+(* Compatibility mode *)
+
+type compat_version = V8_2
+let compat_version = ref None
+let version_strictly_greater v =
+ match !compat_version with None -> true | Some v' -> v'>v
+let version_less_or_equal v = not (version_strictly_greater v)
+
(* Translate *)
let beautify = ref false
let make_beautify f = beautify := f
diff --git a/lib/flags.mli b/lib/flags.mli
index e8a7819c89..50ba923b74 100644
--- a/lib/flags.mli
+++ b/lib/flags.mli
@@ -29,6 +29,11 @@ val raw_print : bool ref
val unicode_syntax : bool ref
+type compat_version = V8_2
+val compat_version : compat_version option ref
+val version_strictly_greater : compat_version -> bool
+val version_less_or_equal : compat_version -> bool
+
val beautify : bool ref
val make_beautify : bool -> unit
val do_beautify : unit -> bool