Hax_engine.Deprecated_generic_printer_base
Generic printer for the Ast
ASTs. It uses the PPrint
library, and additionally computes Annotation.t
.
type ast_position =
| GenericValue_GType
| GenericValue_GConst
| Lhs_LhsArbitraryExpr
| Lhs_LhsArrayAccessor
| Ty_TArrow
| Ty_TRef
| Ty_Tuple
| Ty_TSlice
| Ty_TArray_typ
| Ty_TArray_length
| Expr_If_cond
| Expr_If_then
| Expr_If_else
| Expr_Array
| Expr_Assign
| Expr_Closure_param
| Expr_Closure_body
| Expr_Ascription_e
| Expr_Ascription_typ
| Expr_Let_lhs
| Expr_Let_rhs
| Expr_Let_body
| Expr_Quote
| Expr_Match_scrutinee
| Expr_QuestionMark
| Expr_Borrow
| Expr_TupleProjection
| Expr_ConstructTuple
| Expr_FieldProjection
| Expr_App_f
| Expr_App_arg
| Expr_ConcreteInductive_base
| Expr_ConcreteInductive_field
| Pat_PBinding_subpat
| Pat_PDeref
| Pat_PArray
| Pat_ConstructTuple
| Pat_ConcreteInductive
| Pat_Ascription_pat
| Pat_Ascription_typ
| Pat_Or
| Param_pat
| Param_typ
| GenericParam_GPType
| GenericParam_GPConst
| Arm_pat
| Arm_body
| Item_Fn_body
Identifies a position in the AST. This is useful for figuring out wether we should wrap a chunk of AST in parenthesis, or not, or for implementing special treatment of some sub-trees if they occur in a certain context.
module Annotation : sig ... end
type annot_str = Prelude.string * Annotation.t Prelude.list
val pp_annot_str :
Ppx_deriving_runtime.Format.formatter ->
annot_str ->
Ppx_deriving_runtime.unit
val show_annot_str : annot_str -> Ppx_deriving_runtime.string
val annot_str_of_yojson : Ppx_yojson_conv_lib.Yojson.Safe.t -> annot_str
val yojson_of_annot_str : annot_str -> Ppx_yojson_conv_lib.Yojson.Safe.t
When printing a chunk of AST, should we wrap parenthesis (NeedsPar
) or not (AlreadyPar
)?
module Make (F : Features.T) : sig ... end