From 77ae152ece4efbf8dde983c03bd995c982522bfd Mon Sep 17 00:00:00 2001 From: Chimrod <> Date: Sat, 28 Oct 2023 22:17:24 +0200 Subject: Updated the interface --- lib/syntax/tree.mli | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib/syntax/tree.mli') diff --git a/lib/syntax/tree.mli b/lib/syntax/tree.mli index 84e5d1b..0032f03 100644 --- a/lib/syntax/tree.mli +++ b/lib/syntax/tree.mli @@ -7,6 +7,9 @@ (** This module is the result of the evaluation. *) module Ast : sig + type 'a literal = 'a T.literal = Text of string | Expression of 'a list + [@@deriving eq, show] + type 'a variable = { pos : 'a; name : string; index : 'a expression option } [@@deriving eq, show] (** A variable, used both in an expression (reference) or in a statement @@ -14,7 +17,7 @@ module Ast : sig and 'a expression = | Integer of 'a * string - | Literal of 'a * string + | Literal of 'a * 'a expression literal list | Ident of 'a variable | BinaryOp of 'a * T.boperator * 'a expression * 'a expression | Op of 'a * T.uoperator * 'a expression -- cgit v1.2.3