ocsigen/js_of_ocaml — pull request #239 by Drup (2014-10-18 19:26:11+00:00)
Title: Ppx for js_of_ocaml

Shouldn't not be merged, the syntax is not the final one (waiting for ocaml here). Everything that should be `foo##bar` is `[%js foo#bar]` instead.

It's feature-par with the camlp4 one, plus object literals with optional fields.

- `obj#.field` for field access
- `obj#.field := x` for field modification
- `obj##meth arg1 arg2 arg3` for method calls
- `obj##meth` for method calls without arguments
- `new%js constructor` for prototype instanciation.
- `object%js ... end` for literal objects. `[@@optional]` to make the field optional.

What remains to do:

- Automatic generation of literal object's type (especially wrt to optional fields).
- Use the mutable annotation in object literals to choose between `readonly_prop` and `prop`.
- Clean up and factorize the code some more.
- Document.
- Test error locations.
- Solve the "fresh name" issue. I'm not fond of the fixed seed prng solution.

cc @whitequark @alainfrisch