-
Notifications
You must be signed in to change notification settings - Fork 831
Merge consequent open decls and hash directives into single structure blocks #3971
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
Merge consequent open decls and hash directives into single structure blocks #3971
Conversation
|
@dotnet-bot test Ubuntu14.04 Release_fcs Build please |
src/fsharp/vs/ServiceStructure.fs
Outdated
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.
Are we better off with IsNullOrWhitespace here?
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.
omg yes, I was sure I use this function :( Thanks for the review. Fixed.
# Conflicts: # src/fsharp/TypeChecker.fs
9a6a79b to
01a235d
Compare
|
LGTM. Add a test to tests/service please |
…-decls-and-hash-directives
|
@dsyme done. |
|
@vasily-kirichenko Wow, thank you for such extensive tests, those are fantastic. Very impressive |
| | r :: rest, last :: _ when r.StartLine = last.EndLine + 1 -> | ||
| | r :: rest, last :: _ | ||
| when r.StartLine = last.EndLine + 1 || | ||
| sourceLines.[last.EndLine..r.StartLine - 2] |> Array.forall System.String.IsNullOrWhiteSpace -> |
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.
@vasily-kirichenko what is it that ensures that r.StartLine > 2 here? Is it possible that r.StartLine may = 1?
| let rec loop (input: range list) (res: range list list) currentBulk = | ||
| match input, currentBulk with | ||
| | [], [] -> List.rev res | ||
| | [], _ -> List.rev (currentBulk::res) |
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 imagine that currentBulk is a legacy typo for currentBlk, it probably makes sense to fix this while here.
This fixes https://youtrack.jetbrains.com/issue/RIDER-10324
/cc @auduchinok