File: Std_longident.mli

package info (click to toggle)
ocamlformat 0.27.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 12,068 kB
  • sloc: ml: 61,288; pascal: 4,739; lisp: 229; sh: 217; makefile: 121
file content (54 lines) | stat: -rw-r--r-- 2,161 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
(**************************************************************************)
(*                                                                        *)
(*                              OCamlFormat                               *)
(*                                                                        *)
(*            Copyright (c) Facebook, Inc. and its affiliates.            *)
(*                                                                        *)
(*      This source code is licensed under the MIT license found in       *)
(*      the LICENSE file in the root directory of this source tree.       *)
(*                                                                        *)
(**************************************************************************)

module String_id : sig
  val is_prefix : string -> bool
  (** Holds for prefix symbols. *)

  val is_infix : string -> bool
  (** Holds for infix symbols. *)

  val is_symbol : string -> bool
  (** Holds for prefix or infix symbols. *)

  val is_hash_getter : string -> bool
  (** [is_hash_getter id] returns whether [id] is considered a hash-getter
      operator, of the form [#**#] or [#**.] where [**] can be 0 or more
      operator chars. *)

  val is_monadic_binding : string -> bool
  (** [is_monadic_binding id] returns whether [id] is a monadic binding
      operator of the form [let**] or [and**] where [**] can be 1 or more
      operator chars. *)
end

val is_infix : Longident.t -> bool
(** Holds for infix identifiers. *)

val is_prefix : Longident.t -> bool

val is_index_op : Longident.t -> bool

val is_symbol : Longident.t -> bool

val is_hash_getter : Longident.t -> bool
(** [is_hash_getter id] returns whether [id] is considered a hash-getter
    operator, of the form [#**#] or [#**.] where [**] can be 0 or more
    operator chars. *)

val is_monadic_binding : Longident.t -> bool
(** [is_monadic_binding id] returns whether [id] is a monadic binding
    operator of the form [let**] or [and**] where [**] can be 1 or more
    operator chars. *)

val field_alias_str : field:Longident.t -> string -> bool

val field_alias : field:Longident.t -> Longident.t -> bool