ppxlib
A comprehensive toolbox for ppx development. It features:
1024" x-on:close-sidebar="sidebar=window.innerWidth > 1024 && true">
package ppxlib
-
ppxlib
-
-
ppxlib.ast
-
-
ppxlib.metaquot
-
ppxlib.metaquot_lifters
-
ppxlib.print_diff
-
ppxlib.runner
-
ppxlib.runner_as_ppx
-
ppxlib.traverse
-
ppxlib.traverse_builtins
Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
Library ppxlib
To use these classes, inherit from them and override the methods corresponding to the types from Parsetree
you want to process. For instance to collect all the string constants in a structure:
let string_constants_of = object
inherit [string list] Ast_traverse.fold as super
method! expression e acc =
let acc = super#expression e acc in
match e.pexp_desc with
| Pexp_constant (Const_string (s, _)) -> s :: acc
| _ -> acc
method! pattern p acc =
let acc = super#pattern p acc in
match p.ppat_desc with
| Ppat_constant (Const_string (s, _)) -> s :: acc
| _ -> acc
end
let string_constants_of_structure = string_constants_of#structure
class map : object ... end
class iter : object ... end
class 'acc fold : object ... end
class 'acc fold_map : object ... end
class 'ctx map_with_context : object ... end
class virtual 'res lift : object ... end
class sexp_of : object ... end
val sexp_of : sexp_of
ON THIS PAGE
No table of contents