-
Notifications
You must be signed in to change notification settings - Fork 831
Language Service prefers original parse results #14292
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
Conversation
|
@dotnet/fsharp-team-msft and maybe @dsyme, please see the description and look carefully :) either I have identified some useless code deep down in the repo, or this is actually some corner case that might be useful for some other scenarios. I mean, either way, |
|
/run fantomas |
Co-authored-by: psfinaki <[email protected]>
|
The error message would indicate some unexpected weirdness with node ranges. |
|
Yeah the problem is that When this happens the ranges associated with the synthetic OK so for So @psfinaki I think the solution is to systematically have all the non-typechecking SyntaxTree traversals work over the That is, we should go through all the SyntaxTree travels walking over SynExpr.Lambda and adjust them to do sub-tree traversals on I think this will then make the trees look OK and you should be able to keep the assert I think Add a comment to the assert point out that you can analyse parse trees using sharplab.io or the Fantomas tools, and that the problem may be to do with some synthetic transfomation happening after parsing. |
|
Out of curiousity, what's the rationale behind such a transformation? |
commit ceb3acc Author: Don Syme <[email protected]> Date: Mon Nov 14 15:39:35 2022 +0000 Language Service prefers original parse results
|
/run fantomas |
Co-authored-by: psfinaki <[email protected]>
|
A bit of a heads up here, the |
|
@nojaf looks like we should address those too, whether as part of this PR or separate |
|
This got stale, will close it. |
See @dsyme's comment down below.