From 6fd720c07e3e361932e01bfbdbe4637c8f610649 Mon Sep 17 00:00:00 2001 From: Chimrod <> Date: Sun, 4 Feb 2024 10:37:04 +0100 Subject: Added a general context for each test --- lib/syntax/S.ml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'lib/syntax/S.ml') 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 -- cgit v1.2.3