blob: f4bc34ebe4dd910d093ecba3a10c09f6f479e75e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
type pos = Lexing.position * Lexing.position
type ('a, 'b) variable = { pos : 'a; name : string; index : 'b option }
module Expression = struct
type 'a obs
type repr = unit
type variable = { pos : pos; name : string; index : repr option }
(**
Describe a variable, using the name in capitalized text, and an optionnal
index.
If missing, the index should be considered as [0].
*)
let ident : variable -> repr = fun _ -> ()
(*
Basic values, text, number…
*)
let integer : pos -> string -> repr = fun _ _ -> ()
let literal : pos -> string -> repr = fun _ _ -> ()
(** Call a function. The functions list is hardcoded in lib/lexer.mll *)
let function_ : pos -> T.function_ -> repr list -> repr = fun _ _ _ -> ()
(** Unary operator like [-123] or [+'Text']*)
let uoperator : pos -> T.uoperator -> repr -> repr = fun _ _ _ -> ()
(** Binary operator, for a comparaison, or an operation *)
let boperator : pos -> T.boperator -> repr -> repr -> repr = fun _ _ _ _ -> ()
end
|