-
Notifications
You must be signed in to change notification settings - Fork 233
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
Support for .cppo.ml files #548
Comments
#202 is already about that. I see two parts to this work:
I can look at the first part and help you get started on the second one. |
@let-def Sounds great! I looked through the source and found a file
|
@chrismamo1 I can imageine people using this code layout when method chaining. E.g.,
Not sure if it exists in practice, but it could. As long as the cppo parsing can be disabled, I don't think that'd be a problem. |
@chrismamo1 this lexer is only used for reconstructing the identifier under the cursor. But I don't have much time for looking at that right now, sorry. |
@raphael-proust Your example would be working fine with @chrismamo1's change:
@chrismamo1 We should also include Note: I cannot find the way to run |
I think that, as long as the possible conflicts with objects is documented, it shouldn't be a problem. Note that the following is valid. It's really not idiomatic though, so I think it should be ok.
|
Hmm... You are right, I can't avoid grammar clashes in your example! I know so little about the many possibilities of the language - especially object-oriente ones! 😊 As soon as I find out how to work around these duplicate rules in menhir, I'll try to open a PR! |
Does anyone understand the error (running
The second declaration of I am stuck 😕 Maybe I should use an older version of menhir? (I am using menhir 20170509) |
Merlin uses a custom version of Menhir, you can't do the preprocessing without it. |
(which I might have the time to do next week) |
Done. Current git version should be compatible with the released version of Menhir. |
Thanks, that was fast!! 😀 I still have a slight problem: |
I forgot to commit those files. That should be fixed now. |
When working on better cppo integration, I have been stuck with merlin not being able to find any let a () = ()
let () = a () and the file
and running It would give
The
After a lot of research, I stubbled upon the PR #474 that adds the SUFFIX thing in
so that merlin can find the definition of Where should I document that? |
PR #875 implements a similar feature (OCaml -pp flag). |
Would be nice to have this, since currently merlin-based setup for Vim can't handle files with cppo directives. |
The C Preprocessor for OCaml seems to be gaining traction in quite a few projects (UTop, ppx_deriving, etc.). However, CPPO directives seem to break Merlin. I would like to add a quick fix for this problem, but am unfamiliar with the internals of Merlin. Would any core project maintainers be willing to help me get started on this?
The text was updated successfully, but these errors were encountered: