Module 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 =
  1. | GenericValue_GType
  2. | GenericValue_GConst
  3. | Lhs_LhsArbitraryExpr
  4. | Lhs_LhsArrayAccessor
  5. | Ty_TArrow
  6. | Ty_TRef
  7. | Ty_Tuple
  8. | Ty_TSlice
  9. | Ty_TArray_typ
  10. | Ty_TArray_length
  11. | Expr_If_cond
  12. | Expr_If_then
  13. | Expr_If_else
  14. | Expr_Array
  15. | Expr_Assign
  16. | Expr_Closure_param
  17. | Expr_Closure_body
  18. | Expr_Ascription_e
  19. | Expr_Ascription_typ
  20. | Expr_Let_lhs
  21. | Expr_Let_rhs
  22. | Expr_Let_body
  23. | Expr_Quote
  24. | Expr_Match_scrutinee
  25. | Expr_QuestionMark
  26. | Expr_Borrow
  27. | Expr_TupleProjection
  28. | Expr_ConstructTuple
  29. | Expr_FieldProjection
  30. | Expr_App_f
  31. | Expr_App_arg
  32. | Expr_ConcreteInductive_base
  33. | Expr_ConcreteInductive_field
  34. | Pat_PBinding_subpat
  35. | Pat_PDeref
  36. | Pat_PArray
  37. | Pat_ConstructTuple
  38. | Pat_ConcreteInductive
  39. | Pat_Ascription_pat
  40. | Pat_Ascription_typ
  41. | Pat_Or
  42. | Param_pat
  43. | Param_typ
  44. | GenericParam_GPType
  45. | GenericParam_GPConst
  46. | Arm_pat
  47. | Arm_body
  48. | 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
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 equal_annot_str : annot_str -> annot_str -> Ppx_deriving_runtime.bool
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
type par_state =
  1. | NeedsPar
  2. | AlreadyPar

When printing a chunk of AST, should we wrap parenthesis (NeedsPar) or not (AlreadyPar)?

type literal_ctx =
  1. | Pat
  2. | Expr

The context of a literal in the AST, does it appear in a pattern (Pat) or in an expression (Expr)?

module Make (F : Features.T) : sig ... end