aboutsummaryrefslogtreecommitdiff
path: root/lib/syntax/default.ml
diff options
context:
space:
mode:
authorChimrod <>2023-10-22 07:14:20 +0200
committerChimrod <>2023-10-25 17:56:30 +0200
commit2a2198e91063684a1b19974acc19c25b55266724 (patch)
treeb43e4b1b62c61fd828a53d6b261c790ffa797ae0 /lib/syntax/default.ml
parent2cad3abf180c14e0c026033d65f4fb895b5348f7 (diff)
Refactoring the API
Diffstat (limited to 'lib/syntax/default.ml')
-rw-r--r--lib/syntax/default.ml22
1 files changed, 8 insertions, 14 deletions
diff --git a/lib/syntax/default.ml b/lib/syntax/default.ml
index dad5144..45e7c14 100644
--- a/lib/syntax/default.ml
+++ b/lib/syntax/default.ml
@@ -17,29 +17,23 @@ module Expression (T' : T) = struct
If missing, the index should be considered as [0].
*)
- let ident : (S.pos, T'.t S.repr) S.variable -> T'.t S.repr =
- fun _ report -> (T'.default, report)
+ let ident : (S.pos, T'.t) S.variable -> T'.t = fun _ -> T'.default
(*
Basic values, text, number…
*)
- let integer : S.pos -> string -> T'.t S.repr =
- fun _ _ report -> (T'.default, report)
-
- let literal : S.pos -> string -> T'.t S.repr =
- fun _ _ report -> (T'.default, report)
+ let integer : S.pos -> string -> T'.t = fun _ _ -> T'.default
+ let literal : S.pos -> string -> T'.t = fun _ _ -> T'.default
(** Call a function. The functions list is hardcoded in lib/lexer.mll *)
- let function_ : S.pos -> T.function_ -> T'.t S.repr list -> T'.t S.repr =
- fun _ _ _ report -> (T'.default, report)
+ let function_ : S.pos -> T.function_ -> T'.t list -> T'.t =
+ fun _ _ _ -> T'.default
(** Unary operator like [-123] or [+'Text']*)
- let uoperator : S.pos -> T.uoperator -> T'.t S.repr -> T'.t S.repr =
- fun _ _ _ report -> (T'.default, report)
+ let uoperator : S.pos -> T.uoperator -> T'.t -> T'.t = fun _ _ _ -> T'.default
(** Binary operator, for a comparaison, or an operation *)
- let boperator :
- S.pos -> T.boperator -> T'.t S.repr -> T'.t S.repr -> T'.t S.repr =
- fun _ _ _ _ report -> (T'.default, report)
+ let boperator : S.pos -> T.boperator -> T'.t -> T'.t -> T'.t =
+ fun _ _ _ _ -> T'.default
end