package ocamlformat

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type brackets =
  1. | Round
  2. | Square
  3. | Curly
type custom_operator = {
  1. path : Ocamlformat_stdlib.string Ocamlformat_stdlib.list;
    (*

    eg. a.X.Y.*{b}

    *)
  2. opchars : Ocamlformat_stdlib.string;
  3. brackets : brackets;
}
type indexing_op =
  1. | Defined of Extended_ast.expression * custom_operator
    (*

    .*( a ): take a single argument

    *)
  2. | Extended of Extended_ast.expression Ocamlformat_stdlib.list * custom_operator
    (*

    .*( a; b; c ): take several arguments, separated by ;

    *)
  3. | Special of Extended_ast.expression Ocamlformat_stdlib.list * brackets
    (*

    .(), .[] and bigarray operators: take several arguments, separated by ,

    *)

get_sugar e args is Some all if e is an identifier that is an indexing operator and if the sugar syntax is already used in the source, None otherwise. args should be the arguments of the corresponding Pexp_apply.

OCaml

Innovation. Community. Security.