Skip to content

Conversation

@nojaf
Copy link
Contributor

@nojaf nojaf commented Jun 30, 2022

Fixes #13273.

@nojaf nojaf closed this Jun 30, 2022
@nojaf nojaf reopened this Jun 30, 2022
@nojaf
Copy link
Contributor Author

nojaf commented Jul 1, 2022

@dsyme ready for review!

None
#endif
)
|> Seq.map (fun mb ->
Copy link
Contributor

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))
Copy link
Contributor

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, _); _ ]) ->
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Better representation of get/set member

2 participants