Open rgrinberg opened 10 years ago
Hi! I'm pretty sure I had a branch about that somewhere, at some point. I'll try to find it again; I'll let you know.
For cppo, I think it should be quite easy: merlin should ignore all lines starting with blanks followed by a '#' and the lines hereafter as long as they end with a '\'.
From the cppo manual: a cppo directive is a '#' sign placed at the beginning of a line, possibly preceded by some whitespace, and followed by a valid directive name or by a number: [...] Directives can be split into multiple lines by placing a backslash \ at the end of the line to be continued.
There is a request for cppo support in merlin just now on caml-list by Dmitry Bely. https://sympa.inria.fr/sympa/arc/caml-list/2015-08/msg00179.html
I spent some time on this issue. While not too hard to implement, Merlin architecture doesn't suit this case well. Refactoring is going on, this will come in a few months :/.
This is actually a much lower priority for me now that optcomp has been converted with ppx. Would be cool to have this though.
It's not clear to me that optcomp is really converted to ppx. Isn't it rather the ppx driver provided by jane street that also integrates optcomp processing? My understanding is that it is defined as a custom lexer, so before the proper ppx level, and in particular it is not clear (to me) that it would be supported by Merlin as other ppx are -- but it should also be possible to implement it at the lexer level in Merlin.
The optcomp mechanism in janestreet's driver is indeed not a ppx and does not work with merlin.
@def-lkb any update on this?
Would also love to have this in merlin
This would be useful. However, just having Merlin ignore cppo
directives won't cut it. Merlin must actually run cppo
, with appropriate command line options.
Not sure how this would even work in theory but it would be nice if merlin at least didn't report them as syntax errors.