Skip to content
Ad-hoc ppx refactoring tool
OCaml
Branch: master
Clone or download
diml Initial import
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
Latest commit 68bb1ba Jun 20, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin Initial import Jun 20, 2019
src Initial import Jun 20, 2019
test/src Initial import Jun 20, 2019
.gitignore Initial import Jun 20, 2019
LICENSE.md Initial import Jun 20, 2019
README.md Initial import Jun 20, 2019
dune-project Initial import Jun 20, 2019

README.md

ppx_refactor

ppx_refactor is a small ppx tool that make it easy to create local code refactoring that preserve the layout of files being rewritten.

Overview

ppx_refactor uses the same idea as camlp4-to-ppx. This is how it works:

  1. it parses the input file using the OCaml parser
  2. it apply the user-defined refactoring which records text substitution based on locations
  3. it applies the text substitution on the original file

To define a refactoring, one essentially has to write a small piece of OCaml code that uses the ppx_refactor API.

You can’t perform that action at this time.