diff options
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 = |