package ppx_tools_versioned

  1. Overview
  2. Docs

Convenience functions to help build and deconstruct AST fragments.

Compatibility modules

module Label : sig ... end
module Constant : sig ... end

Misc

Expressions

Return () if the list is empty. Tail rec.

Patterns

Types

AST deconstruction

val get_str : Ast_403.Parsetree.expression -> string option
val get_str_with_quotation_delimiter : Ast_403.Parsetree.expression -> (string * string option) option
val get_lid : Ast_403.Parsetree.expression -> string option
val has_attr : string -> Ast_403.Parsetree.attributes -> bool
val find_attr : string -> Ast_403.Parsetree.attributes -> Ast_403.Parsetree.payload option
val find_attr_expr : string -> Ast_403.Parsetree.attributes -> Ast_403.Parsetree.expression option