Support BER MetaOCaml N111 (in Unix)#1602
Conversation
|
I'm surprised this is enough. Don't you want to print theses new tokens back ? |
|
Hi!
Are you mentioning about OCamlFormat's changing quoting syntax sugars to attributes representations (e.g. |
|
Although I am not familiar with the entire structure of OCamlFormat, I think Printast.expression's difference is related to this problem. |
|
A special case will need to be added early in https://github.com/ocaml-ppx/ocamlformat/blob/master/lib/Fmt_ast.ml#L1553. |
|
You may be interested in the corresponding issue for BER MetaOCaml support in OCamlFormat, and this patch that provides a minimal implementation with the current use of attributes. |
Nice |
|
Indeed, thanks. For what it's worth, I agree with your comments on the corresponding OCaml PR that extension points would be a better representation here & think it's worth waiting a little bit on the OCamlformat side until that question is resolved upstream. |
Thanks! It was very easy to understand.
I roughly understand the current situation. I think so, personally. |
|
metaocaml support added in #2630 |
This PR is for supporting BER MetaOCaml N111, which is OCaml 4.11.1 extended to support meta-programming (see http://okmij.org/ftp/ML/MetaOCaml.html). Because MetaOCaml adds
>.,.~, and.<to original OCaml syntax, it addsGREATERDOT,DOTTILDE, andDOTLESSto token.I tested it but
tools/test_branch.sh ber-n111did't work, of course because HEAD was not buildable in MetaOCaml.The test by
make testworked fine :-)