OCamlPro/ocp-indent — pull request #141 by hhugo (2014-08-17 20:39:58+00:00)
Title: extensions

First draft.
Allows to register external extensions by providing
- an associative list of identifers to tokens (like Lwt extensions).
- a custom lexer

One can load extensions by giving a cm{o,a,xs} filename or a findlib package

```ocp-indent --load-pkgs eliom.ocp-indent --load-mods my_custom_lexer.cmxs```

https://github.com/OCamlPro/ocp-indent/pull/139 : MetaOcaml syntax extensions could be as simple as
```
{
open Approx_tokens
}

rule lexer = parse
| ".<" { LPAREN }
| ">." { RPAREN }
| ".~" { BANG }
{
let _ = IndentExtend.register "metaocaml" ~lexer ()
}
```