aboutsummaryrefslogtreecommitdiff
path: root/lib/syntax/tree.mli
diff options
context:
space:
mode:
authorChimrod <>2023-10-28 22:17:24 +0200
committerChimrod <>2023-11-02 11:06:12 +0100
commit77ae152ece4efbf8dde983c03bd995c982522bfd (patch)
treeb6427477b66042f766e58148441166b83984ddbb /lib/syntax/tree.mli
parentdd060261e35fcb8a57f03b01dbe84ab772a2a199 (diff)
Updated the interface
Diffstat (limited to 'lib/syntax/tree.mli')
-rw-r--r--lib/syntax/tree.mli5
1 files changed, 4 insertions, 1 deletions
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