package ppx_string

  1. Overview
  2. Docs
Ppx extension for string interpolation

Install

dune-project
 Dependency

Authors

Maintainers

Sources

v0.17.0.tar.gz
sha256=06b4e061fb5e2b2a85298c9829cc31a1af0a9b8e63fdee9048c76ec8d52d16ef

doc/ppx_string/Ppx_string/index.html

Module Ppx_stringSource

Sourcemodule 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.

Sourcemodule Part : sig ... end
Sourcemodule Parse_result : sig ... end
Sourceval 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.

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

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

Sourceval 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.

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

Construct an Extension.t implementing the configured interpolation ppx.

Sourceval config_for_string : Config.t

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