package ppxlib
Standard infrastructure for ppx rewriters
Install
Dune Dependency
Authors
Maintainers
Sources
ppxlib-0.33.0.tbz
sha256=ffa44ef551f23b75e21dbd698a30310431381aaf140b9fe4b81c2e70a2d2c63a
sha512=cd865efc78e85d662fab3d05de7675a46252a241db44cbf13a930017c6890da5f161fbf8511b97abd9d61bffca0cb84b3adf580b55a3820afdb4a2337e9a4a63
doc/ppxlib/Ppxlib/Driver/Cookies/index.html
Module Driver.Cookies
Source
Source
val get :
t ->
string ->
(Astlib.Ast_500.Parsetree.expression, 'a -> 'a, 'b) Ast_pattern.t ->
'b option
get cookies name pattern
look for a cookie named name
and parse it using pattern
. Raises if the parsing fails.
Source
val get_res :
t ->
string ->
(Astlib.Ast_500.Parsetree.expression, 'a -> 'a, 'b) Ast_pattern.t ->
('b option, Location.Error.t Stdppx.NonEmptyList.t) result
get cookies name pattern
look for a cookie named name
and parse it using pattern
, returning a result
instead of raising when the parsing fails.
set cookies name expr
set cookie name
to expr
.
Register a callback that is called before a rewriting. The handler is expected to lookup some cookies and set some global variables.
This API is a temporary hack to allow to migrate from add_arg
to the use of cookie, until ppxlib has been upgraded to pass cookies through.
Source
val add_simple_handler :
string ->
(Astlib.Ast_500.Parsetree.expression, 'a -> 'a, 'b) Ast_pattern.t ->
f:('b option -> unit) ->
unit
Shorthand for: add_handler (fun t -> f (get t name pattern))
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>