package gospel

  1. Overview
  2. Docs

Pre-identifiers

These are not unique identifier; they come out of the parser and are used in the untyped AST.

type t = private {
  1. pid_str : string;
    (*

    The identifier name.

    *)
  2. pid_attrs : string list;
    (*

    The attributes of the identifier.

    *)
  3. pid_loc : Ppxlib.Location.t;
    (*

    The location of the identifier.

    *)
}

The type for pre-identifiers.

val pp : Format.formatter -> t -> unit

Pretty printer for pre-identifiers.

val create : ?attrs:string list -> loc:Ppxlib.Location.t -> string -> t

create ~attrs ~loc id is a new pre-identifier identified with id with attributes attrs and location loc. Default attributes are empty, and default location is Location.none.

val add_attr : t -> string -> t

add_attr t attr is t with attr added to the list of its attributes.

OCaml

Innovation. Community. Security.