-
Notifications
You must be signed in to change notification settings - Fork 230
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
[New Command] Expand PPX nodes #1745
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks very nice and is a very useful feature. Thanks a lot, @PizieDust! two general comments:
As a suggestion for an addition to the tests: It would be interesting to test what happens when you use the feature on a deriver that's not registered via dune
. Or when you use it on a deriver that triggers some other error, e.g. you call it with a flag
, when it doesn't support flags, or it expects some value to be in scope that's not in scope. In those cases, do the errors appear as "derived code" or not?
And as a nit-pick: merlin-lib
doesn't know about hover, so the title of the PR is a little misleading. The part of your work about hover is the related work you've done on ocaml-lsp.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dit a round of review. I did not tackle the heart of the PR yet
Add parsetree processing functions Mbrowse for parsetrees Browse_raw for parsetrees expand node logic add tests refactor logic better json response use lexing locations refactor type exceptions discard tests of external dependencies custom ppx deriver that just renames tests for expand-node feature ensure location invariants by setting loc_ghost to true cover all ghost locations updated changelog add eof to tests properly handle type_exceptions in browse_raw add helper functions remove private function from public scope change logic to use typedtree add helper functions for str items and sig items more tests remote unused variant better naming better linting lint unrelated test change due to type_exception fixup in the Typedtree Remove Mbrowse and Browse raw modules for the Pasetree better alignment better tests output with attribute loc range refactoring of ppx-expand logic refactor pretty print nodes return list of ppx nodes and not just head add ppx rewriter refactor logic to use Ast_iterator remove unused code update test remove unused code remove redundant code remove whitespace
closes #1744
This implementation has support for: