package reason

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Reason_layoutSource

Sourcemodule Easy_format = Vendored_easy_format
Sourcemodule Comment = Reason_comment
Sourcetype break_criterion =
  1. | Never
  2. | IfNeed
  3. | Always
  4. | Always_rec
Sourcetype separator =
  1. | NoSep
  2. | Sep of string
  3. | SepFinal of string * string
Sourcemodule WhitespaceRegion : sig ... end

* Module concerning info to correctly interleave whitespace above a layout node.

Sourcetype t =
  1. | SourceMap of Location.t * t
  2. | Sequence of config * t list
  3. | Label of Easy_format.t -> Easy_format.t -> Easy_format.t * t * t
  4. | Easy of Easy_format.t
  5. | Whitespace of WhitespaceRegion.t * t

* These represent "intent to format" the AST, with some parts being annotated * with original source location. The benefit of tracking this in an * intermediate structure, is that we can then interleave comments throughout * the tree before generating the final representation. That prevents the * formatting code from having to thread comments everywhere. * * The final representation is rendered using Easy_format.

Sourceand config = {
  1. break : break_criterion;
  2. wrap : string * string;
  3. inline : bool * bool;
  4. sep : separator;
  5. indent : int;
  6. sepLeft : bool;
  7. preSpace : bool;
  8. postSpace : bool;
  9. pad : bool * bool;
  10. listConfigIfCommentsInterleaved : (config -> config) option;
  11. listConfigIfEolCommentsInterleaved : (config -> config) option;
}
Sourceval string_of_easy : Easy_format.t -> string
Sourceval indent_more : string -> string
Sourceval dump_easy : Format.formatter -> Easy_format.t -> unit
Sourceval dump : Format.formatter -> t -> unit
Sourceval source_map : ?loc:Location.t -> t -> t
Sourceval default_list_settings : Easy_format.list_param
Sourceval easy_settings_from_config : config -> string * string * string * Easy_format.list_param
Sourceval to_easy_format : t -> Easy_format.t
Sourceval get_location : t -> Location.t option

getLocFromLayout recursively takes the unioned location of its children, * and returns the max one

Sourceval is_before : location:Ppxlib.Location.t -> t -> bool
Sourceval contains_location : t -> location:Ppxlib.Location.t -> bool
OCaml

Innovation. Community. Security.