Skip to content

Conversation

@nojaf
Copy link
Contributor

@nojaf nojaf commented Apr 20, 2022

Another attempt to solve #11893.
This serves as an alternative to #12989.

One potential performance concern of this approach is changing the Ident struct to a Discriminated Union SynIdentOrOperatorName.
Besides that, the impact is a lot less as no SynPat shapes were altered.
This feels a lot safer but might also have drawbacks.

If anybody has any clues on how to verify the expected performance impact, I'm all ears.

//cc @dsyme, @auduchinok

@nojaf nojaf marked this pull request as draft April 20, 2022 12:55
@auduchinok
Copy link
Member

The approach in #12989 gives us significantly better ways to recover various syntax errors and to analyse unfinished or incorrectly written source code. Even without the better operators representations, having a SynPat on the left of the pattern with parameters would really help for error recovery and it goes inline with DotGet/Set-like expressions, where the qualifier expressions is another SynExpr node. I believe it's a better approach in the long term, as it improves on what the syntax tree may represent while not immediately allowing more things to be parsed.

Maybe it'd be safer and easier to have separate PRs for adding parameter owner patterns and for operators.

@nojaf
Copy link
Contributor Author

nojaf commented May 2, 2022

Closing in favour of #13057.

@nojaf nojaf closed this May 2, 2022
@nojaf nojaf deleted the operator-syntax-three branch May 31, 2022 07:03
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.

2 participants