123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- (** Default implementation which does nothing.
- This module is expected to be used when you only need to implement an analyze
- over a limited part of the whole syntax. *)
- module type T = sig
- type t
- val default : t
- end
- module Expression (T' : T) = struct
- (**
- Describe a variable, using the name in capitalized text, and an optionnal
- index.
- 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)
- (*
- 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)
- (** 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)
- (** 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)
- (** 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)
- end
|