Tenyaeva_lib.AstCopyright 2025, Tenyaeva Ekaterina
SPDX-License-Identifier: LGPL-3.0-or-later
val pp_ident :
Ppx_deriving_runtime.Format.formatter ->
ident ->
Ppx_deriving_runtime.unitval show_ident : ident -> Ppx_deriving_runtime.stringval pp_constant :
Ppx_deriving_runtime.Format.formatter ->
constant ->
Ppx_deriving_runtime.unitval show_constant : constant -> Ppx_deriving_runtime.stringval gen_constant : constant QCheck.Gen.tval arb_constant : constant QCheck.arbitraryval pp_rec_flag :
Ppx_deriving_runtime.Format.formatter ->
rec_flag ->
Ppx_deriving_runtime.unitval show_rec_flag : rec_flag -> Ppx_deriving_runtime.stringval gen_rec_flag : rec_flag QCheck.Gen.tval arb_rec_flag : rec_flag QCheck.arbitraryval pp_binary_op :
Ppx_deriving_runtime.Format.formatter ->
binary_op ->
Ppx_deriving_runtime.unitval show_binary_op : binary_op -> Ppx_deriving_runtime.stringval gen_binary_op : binary_op QCheck.Gen.tval arb_binary_op : binary_op QCheck.arbitraryval pp_unary_op :
Ppx_deriving_runtime.Format.formatter ->
unary_op ->
Ppx_deriving_runtime.unitval show_unary_op : unary_op -> Ppx_deriving_runtime.stringval gen_unary_op : unary_op QCheck.Gen.tval arb_unary_op : unary_op QCheck.arbitrarytype type_annot = | Type_intinteger type - int
| Type_boolboolean type - bool
| Type_unitunit type - unit
| Type_var of identvariable type
*)| Type_arrow of type_annot * type_annotarrow type
*)| Type_option of type_annottype option
*)val pp_type_annot :
Ppx_deriving_runtime.Format.formatter ->
type_annot ->
Ppx_deriving_runtime.unitval show_type_annot : type_annot -> Ppx_deriving_runtime.stringval gen_type_annot_sized : int -> type_annot QCheck.Gen.tval gen_type_annot : type_annot QCheck.Gen.tval arb_type_annot_sized : int -> type_annot QCheck.arbitraryval arb_type_annot : type_annot QCheck.arbitrarytype pattern = | Pat_anymatches any value without binding it - _
| Pat_var of identmatches any value and binds it to a variable, e.g. x
*)| Pat_constant of constantmatches a constant value, e.g. 42, true
*)| Pat_option of pattern Base.optionmatches an optional pattern, e.g. Some x or None
*)| Pat_constraint of type_annot * patterntyped pattern, e.g. a: int
*)val pp_pattern :
Ppx_deriving_runtime.Format.formatter ->
pattern ->
Ppx_deriving_runtime.unitval show_pattern : pattern -> Ppx_deriving_runtime.stringval gen_pattern_sized : int -> pattern QCheck.Gen.tval gen_pattern : pattern QCheck.Gen.tval arb_pattern_sized : int -> pattern QCheck.arbitraryval arb_pattern : pattern QCheck.arbitrarytype expression = | Expr_const of constantconstant, e.g. 10
*)| Expr_ident of identvariable, e.g. x
*)| Expr_option of expression Base.optionoptonal expression, e.g. Some x
*)| Expr_constraint of type_annot * expressiontyped expression, e.g. a: int
*)| Expr_binop of binary_op * expression * expressionbinary operation, e.g. 1 + 5
*)| Expr_unop of unary_op * expressionunary operation, e.g. -7
*)| Expr_fun of pattern * expressionfunction, e.g. fun (x, y) -> x + y
*)| Expr_apply of expression * expressionapplication, e.g. (fun (x, y) -> x + y) (1, 2)
*)| Expr_if of expression * expression * expression Base.optionconditional expression, e.g. if a then b else c
*)| Expr_let of rec_flag * value_binding * value_binding Base.list * expressionlet, e.g. let x = 5
*)| Expr_function of case * case Base.listfunction, e.g. fun (x, y) -> x + y
*)| Expr_match of expression * case * case Base.listpattern matching, e.g. match x with | 0 -> "zero" | _ -> "nonzero"
*)and value_binding = {vb_pat : pattern;the pattern being bound, e.g. x, (a, b)
*)vb_expr : expression;the expression being assigned, e.g. 42, fun x -> x + 1
*)}and case = {case_pat : pattern;the pattern to match, e.g. x, _
*)case_expr : expression;the expression to evaluate if the pattern matches
*)}val pp_expression :
Ppx_deriving_runtime.Format.formatter ->
expression ->
Ppx_deriving_runtime.unitval show_expression : expression -> Ppx_deriving_runtime.stringval pp_value_binding :
Ppx_deriving_runtime.Format.formatter ->
value_binding ->
Ppx_deriving_runtime.unitval show_value_binding : value_binding -> Ppx_deriving_runtime.stringval pp_case :
Ppx_deriving_runtime.Format.formatter ->
case ->
Ppx_deriving_runtime.unitval show_case : case -> Ppx_deriving_runtime.stringtype structure_item = | Str_eval of expressionan expression to be evaluated but not bound, e.g. 1 + 2
*)| Str_value of rec_flag * value_binding * value_binding Base.lista value or function binding, e.g. let x = 1
*)val pp_structure_item :
Ppx_deriving_runtime.Format.formatter ->
structure_item ->
Ppx_deriving_runtime.unitval show_structure_item : structure_item -> Ppx_deriving_runtime.stringtype structure = structure_item Base.listfull program
val pp_structure :
Ppx_deriving_runtime.Format.formatter ->
structure ->
Ppx_deriving_runtime.unitval show_structure : structure -> Ppx_deriving_runtime.string