package ppx_string

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
module Config : sig ... end

Used to configure different instances of this ppx. May be used, for example, to add preprocessing, or to interpolate a different string-like type.

module Part : sig ... end
module Parse_result : sig ... end
val parse : config:Config.t -> string_loc:Ppxlib.location -> delimiter:Base.string Base.option -> Base.string -> Parse_result.t

Parse a string to find interpolated substrings.

val interpret : config:Config.t -> Part.Interpreted.t -> Ppxlib.expression

Interpret an interpolated string as an expression, including %conversions#String and %padding#:8.

val expand : config:Config.t -> expr_loc:Ppxlib.location -> string_loc:Ppxlib.location -> string:Base.string -> delimiter:Base.string Base.option -> Ppxlib.expression

Combines parse, interpret, and concatenation to expand an interpolated string to an expression implementing it.

val extension : name:Base.string -> config:Config.t -> Ppxlib.Extension.t

Construct an Extension.t implementing the configured interpolation ppx.

val config_for_string : Config.t

Configuration for [%string]: string type and conversion type are string, length type is int, and no preprocessing.

OCaml

Innovation. Community. Security.