package ppx_deriving_jsoo

  1. Overview
  2. Docs
module Ocaml_ast_mapper = Ast_mapper
val nolabel : Ppxlib.Asttypes.arg_label
exception Syntax_error of Ppxlib.Location.Error.t
val make_exception : loc:Ppxlib__Location.t -> sub:(Ppxlib__Location.t * string) list -> string -> exn
val raise_errorf : loc:Ppxlib__Location.t -> ('a, unit, string, 'b) Stdlib.format4 -> 'a
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 -> 'a Ppxlib.Asttypes.loc
val mknoloc : 'a -> 'a Ppxlib.Asttypes.loc
val lid : ?loc:Ppxlib.Ast_helper.loc -> string -> Ppxlib.Longident.t Ppxlib.Asttypes.loc
val mkloc_opt : ?loc:Ppxlib.Ast_helper.loc -> 'a -> 'a Ppxlib.Asttypes.loc
val unit : ?loc:Ppxlib_ast__Ast_helper_lite.loc -> ?attrs:Ppxlib_ast__Ast_helper_lite.attrs -> unit -> Astlib.Ast_500.Parsetree.expression
val tuple : ?loc:Ppxlib_ast__Ast_helper_lite.loc -> ?attrs:Ppxlib_ast__Ast_helper_lite.attrs -> Astlib.Ast_500.Parsetree.expression list -> Astlib.Ast_500.Parsetree.expression
val tuple_type : ?loc:Ppxlib_ast__Ast_helper_lite.loc -> ?attrs:Ppxlib_ast__Ast_helper_lite.attrs -> Astlib.Ast_500.Parsetree.core_type list -> Astlib.Ast_500.Parsetree.core_type
val tuple_pat : ?loc:Ppxlib_ast__Ast_helper_lite.loc -> ?attrs:Ppxlib_ast__Ast_helper_lite.attrs -> Astlib.Ast_500.Parsetree.pattern list -> Astlib.Ast_500.Parsetree.pattern
val str : ?loc:Ppxlib_ast__Ast_helper_lite.loc -> ?attrs:Ppxlib_ast__Ast_helper_lite.attrs -> string -> Astlib.Ast_500.Parsetree.expression
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 typ : string -> Astlib.Ast_500.Parsetree.core_type
val arrows : (Astlib.Ast_500.Asttypes.arg_label * Astlib.Ast_500.Parsetree.core_type) list -> Astlib.Ast_500.Parsetree.core_type -> Astlib.Ast_500.Parsetree.core_type

arg1 -> arg2 -> ... -> ret

val wrapper : string option Stdlib.ref
val make_str : ?loc:Astlib__.Location.t -> 'a -> 'a 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 * 'a
val inject_arg : Ppxlib.Parsetree.expression -> Ppxlib.Parsetree.expression
val inject_args : Ppxlib.Parsetree.expression list -> Astlib.Ast_500.Parsetree.expression
module Arg : sig ... end
val js_dot_t_the_first_arg : Arg.t list -> (Ppxlib.Asttypes.arg_label * Ppxlib.Parsetree.core_type) list
val invoker : ?extra_types:string list -> (Arg.t list -> Astlib.Ast_500.Parsetree.core_type -> Astlib.Ast_500.Parsetree.core_type) -> (Arg.t list -> Astlib.Ast_500.Parsetree.core_type -> (Astlib.Ast_500.Asttypes.arg_label * Astlib.Ast_500.Parsetree.core_type) list * Astlib.Ast_500.Parsetree.core_type) -> (Astlib.Ast_500.Parsetree.expression list list -> Astlib.Ast_500.Parsetree.expression) -> Arg.t list -> Astlib.Ast_500.Parsetree.expression
val open_t : Ppxlib.Ast_helper.loc -> Ppxlib.Parsetree.core_type
val method_call : loc:Ppxlib.Location.t -> apply_loc:Ppxlib_ast__Ast_helper_lite.loc -> Ppxlib.Parsetree.expression -> (string * Astlib__.Location.t) -> (Astlib.Ast_500.Asttypes.arg_label * Astlib.Ast_500.Parsetree.expression) list -> Astlib.Ast_500.Parsetree.expression
val prop_get : loc:Ppxlib_ast__Ast_helper_lite.loc -> Ppxlib.Parsetree.expression -> string -> Astlib.Ast_500.Parsetree.expression
val prop_try : loc:Astlib__.Location.t -> Ppxlib.Parsetree.expression -> string -> Astlib.Ast_500.Parsetree.expression -> Astlib.Ast_500.Parsetree.expression
val prop_set : loc:Ppxlib.location -> prop_loc:Ppxlib_ast__Ast_helper_lite.loc -> Ppxlib.Parsetree.expression -> string -> Astlib.Ast_500.Parsetree.expression -> Astlib.Ast_500.Parsetree.expression
val new_object : Astlib.Longident.t Ppxlib.Asttypes.loc -> (Astlib.Ast_500.Asttypes.arg_label * Astlib.Ast_500.Parsetree.expression) list -> Astlib.Ast_500.Parsetree.expression

Instantiation of a class, used by new%js.

module S : sig ... end
val format_meth : Ppxlib.Parsetree.expression -> Ppxlib.Parsetree.expression

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
type field_desc =
  1. | Meth of string Ppxlib.Asttypes.loc * Ppxlib.Asttypes.private_flag * Ppxlib.Asttypes.override_flag * Ppxlib.Parsetree.expression * Arg.t list
  2. | Val of string Ppxlib.Asttypes.loc * Prop_kind.t * Ppxlib.Asttypes.override_flag * Ppxlib.Parsetree.expression
  3. | Cases of string Ppxlib.Asttypes.loc list * Ppxlib.Parsetree.expression list
val filter_map : ('a -> 'b option) -> 'a list -> 'b list
val preprocess_literal_object : ?allow_overload:bool -> (Ppxlib.Parsetree.expression -> Ppxlib.Parsetree.expression) -> Ppxlib.Parsetree.class_field list -> [ `Error of Ppxlib__.Import.extension | `Fields of field_desc list ]
val literal_object : Astlib.Ast_500.Parsetree.pattern -> field_desc list -> Astlib.Ast_500.Parsetree.expression
val transform : Ppxlib.Ast_traverse.map
val mapper : Ocaml_ast_mapper.mapper
OCaml

Innovation. Community. Security.