Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

optcomp/cppo syntax support? #202

Open
rgrinberg opened this issue Apr 11, 2014 · 10 comments
Open

optcomp/cppo syntax support? #202

rgrinberg opened this issue Apr 11, 2014 · 10 comments

Comments

@rgrinberg
Copy link
Member

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.

@trefis
Copy link
Contributor

trefis commented May 13, 2014

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.

@UnixJunkie
Copy link

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.

@UnixJunkie
Copy link

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

@let-def
Copy link
Contributor

let-def commented Sep 29, 2015

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 :/.

@rgrinberg
Copy link
Member Author

This is actually a much lower priority for me now that optcomp has been converted with ppx. Would be cool to have this though.

@gasche
Copy link
Member

gasche commented Sep 29, 2015

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.

@trefis
Copy link
Contributor

trefis commented Sep 29, 2015

The optcomp mechanism in janestreet's driver is indeed not a ppx and does not work with merlin.

@whitequark
Copy link
Member

@def-lkb any update on this?

@little-arhat
Copy link

Would also love to have this in merlin

@fpottier
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants