aboutsummaryrefslogtreecommitdiff
path: root/lib/syntax/S.ml
diff options
context:
space:
mode:
authorChimrod <>2024-02-04 10:37:04 +0100
committerChimrod <>2024-02-08 14:12:45 +0100
commit6fd720c07e3e361932e01bfbdbe4637c8f610649 (patch)
tree26f983295d8674a08fc9367aaac820c0ace675bc /lib/syntax/S.ml
parent35ef1827a216a1deb6d15f916ff197b0c75bc83e (diff)
Added a general context for each test
Diffstat (limited to 'lib/syntax/S.ml')
-rw-r--r--lib/syntax/S.ml13
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/syntax/S.ml b/lib/syntax/S.ml
index afb6526..583249e 100644
--- a/lib/syntax/S.ml
+++ b/lib/syntax/S.ml
@@ -95,9 +95,10 @@ end
module type Location = sig
type t
type instruction
+ type context
val v : t -> Report.t list
- val location : pos -> instruction list -> t
+ val location : context -> pos -> instruction list -> t
end
(** {1 Unified module used by the parser } *)
@@ -112,9 +113,17 @@ module type Analyzer = sig
val active : bool ref
(** Is the test active or not *)
+ type context
+ (** Context used to keep information during the whole test *)
+
+ val initialize : unit -> context
+ (** Initialize the context before starting to parse the content *)
+
module Expression : Expression
module Instruction : Instruction with type expression = Expression.t'
- module Location : Location with type instruction = Instruction.t'
+
+ module Location :
+ Location with type instruction = Instruction.t' and type context := context
end
(** Helper module used in order to convert elements from the differents