Module Parsing0.Attr_helper

Helpers for attributes

Warning: this module is unstable and part of compiler-libs.

type error =
  1. | Multiple_attributes(string)
  2. | No_payload_expected(string)
;
let get_no_payload_attribute: list(string) => Parsetree.attributes => option(Asttypes.loc(string));

The string list argument of the following functions is a list of alternative names for the attribute we are looking for. For instance:

["foo"; "ocaml.foo"]
let has_no_payload_attribute: list(string) => Parsetree.attributes => bool;
exception Error(Location.t, error);
let report_error: Format.formatter => error => unit;