diff options
author | Chimrod <> | 2023-10-28 22:17:24 +0200 |
---|---|---|
committer | Chimrod <> | 2023-11-02 11:06:12 +0100 |
commit | 77ae152ece4efbf8dde983c03bd995c982522bfd (patch) | |
tree | b6427477b66042f766e58148441166b83984ddbb /lib/syntax/check.ml | |
parent | dd060261e35fcb8a57f03b01dbe84ab772a2a199 (diff) |
Updated the interface
Diffstat (limited to 'lib/syntax/check.ml')
-rw-r--r-- | lib/syntax/check.ml | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/lib/syntax/check.ml b/lib/syntax/check.ml index 7db3286..2528914 100644 --- a/lib/syntax/check.ml +++ b/lib/syntax/check.ml @@ -112,10 +112,20 @@ module Make (A : App) = struct type t = result array type t' = result array - let literal : S.pos -> string -> t = - fun pos value -> - Array.map A.t ~f:(fun (E { module_ = (module S); expr_witness; _ }) -> - let value = S.Expression.literal pos value in + let literal : S.pos -> t T.literal list -> t = + fun pos values -> + Array.mapi A.t ~f:(fun i (E { module_ = (module S); expr_witness; _ }) -> + (* Map every values to the Checker *) + let values' = + List.map values ~f:(function + | T.Text t -> T.Text t + | T.Expression e -> + let exprs = + List.rev (Helper.expr_i e expr_witness i).values + in + T.Expression exprs) + in + let value = S.Expression.literal pos values' in R { value; witness = expr_witness }) let integer : S.pos -> string -> t = |