-
Notifications
You must be signed in to change notification settings - Fork 789
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
Keep a notion of the in keyword inside the Abstract Syntax Tree. #10198
Comments
Would checking that Off-topic: (questionable) what would be really great for Fantomas is to be able to find cases where |
@auduchinok that is how we do it today. |
Cool. :) |
Yes, this is purely to improve perf as we jump through some hoops to restore the Other keywords that might be interesting is |
There may be multiple bindings in a single do
let rec f = ()
and g = () in
()
Lines 3281 to 3282 in 5f8a77b
Speaking about the example above: is it harder for you to detect |
Well that sample doesn't work yet 😅 (See fsprojects/fantomas#1176). |
@cartermp any thoughts on this? |
I think this is a reasonable request. Don't think it would be high priority, but I think we'd certainly take a look at a PR. |
Is your feature request related to a problem? Please describe.
When a user tries to format the following code with Fantomas, we try and preserve the
in
keyword. (At least we do inSynExpr.LetOrUse
)Currently, this is part of "trivia process" and this information cannot be found in the Untyped Abstract Syntax tree.
Describe the solution you'd like
Could we extend SynBinding or another node to preserve this information?
Describe alternatives you've considered
Our current workaround is detecting the
IN
token via the Tokenizer.Additional context
I'd like to give this a shot myself if approved.
The text was updated successfully, but these errors were encountered: