-
Notifications
You must be signed in to change notification settings - Fork 832
Refactor get/set members to SynMemberDefn.GetSetMember. #13420
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
|
@dsyme ready for review! |
| None | ||
| #endif | ||
| ) | ||
| |> Seq.map (fun mb -> |
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.
Great to see this code get simpler!
|
|
||
| | SynMemberDefn.GetSetMember (getBinding, setBinding, m, _) -> | ||
| (Option.map (fun b -> SynMemberDefn.Member(b, m)) | ||
| >> Option.iter (parseSynMemberDefn objectModelRange)) |
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'll change this to use pipelining
|
|
||
| match parseResults.ParseTree with | ||
| | Members(SynMemberDefn.Member(range = range; memberDefn = SynBinding(xmlDoc = xmlDoc) as binding) :: _) -> | ||
| | Members([ SynMemberDefn.GetSetMember(Some (SynBinding(xmlDoc = xmlDoc) as binding), _, range, _); _ ]) -> |
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.
It feels like we could do with a test for the XML doc. Looking at the errors expected for this test, the XML doc will get placed on each of the bindings, probably duplicated, it is not shared. I guess this is ok for now - and I know this is really orthogonal to the PR, but it would be good to pin down current behaviour and work out how we can improve the syntax tree
Fixes #13273.