package ppx_deriving_jsoo

  1. Overview
  2. Docs
module Ocaml_ast_mapper = Ast_mapper
exception Syntax_error of Ppxlib.Location.Error.t
val make_exception : loc:Astlib.Location.t -> sub:(Astlib.Location.t * string) list -> string -> exn
val raise_errorf : loc:Astlib.Location.t -> ('a, unit, string, 'b) Stdlib.format4 -> 'c
val unflatten : string list -> Ppxlib.Longident.t option
val split_at_dots : string -> int -> string list
val parse_lid : string -> Ppxlib.Longident.t
val mkloc : 'a -> Astlib.Location.t -> 'b Ppxlib.Asttypes.loc
val mknoloc : 'a -> 'b Ppxlib.Asttypes.loc
val mkloc_opt : ?loc:Ppxlib.Ast_helper.loc -> 'a -> 'b Ppxlib.Asttypes.loc
val exp_to_string : Ppxlib.Parsetree.expression -> string

Check if an expression is an identifier and returns it. Raise a Location.error if it's not.

val wrapper : string option Stdlib.ref
val make_str : ?loc:Astlib.Location.t -> 'a -> 'b Ppxlib.Asttypes.loc
val merlin_hide : Ppxlib.Parsetree.attribute
module Js : sig ... end
val unescape : string -> string
val app_arg : 'a -> Ppxlib.Asttypes.arg_label * 'b
module Arg : sig ... end
val js_dot_t_the_first_arg : Arg.t list -> (Ppxlib.Asttypes.arg_label * Ppxlib.Parsetree.core_type) list
module S : sig ... end

We remove Pexp_poly as it should never be in the parsetree except after a method call.

Ensure basic sanity rules about fields of a literal object:

  • No duplicated declaration
  • Only relevant declarations (val and method, for now).
module Prop_kind : sig ... end
val filter_map : ('a -> 'b option) -> 'c list -> 'd list
val preprocess_literal_object : ?allow_overload:bool -> (Ppxlib.Parsetree.expression -> Ppxlib.Parsetree.expression) -> Ppxlib.Parsetree.class_field list -> [ `Error of string Astlib.Location.loc * Astlib.Ast_500.Parsetree.payload | `Fields of field_desc list ]
val transform : Ppxlib.Ast_traverse.map
val mapper : Ocaml_ast_mapper.mapper