dotnet / dotnet/fsharp

parser recovery is not great for `Ident.(` and the tooling doesn't help typing qualified custom operators

Open
#16,260 0 comments 0 reactions 0 assignees View on GitHub
Area-Compiler-Syntax Feature Improvement
Dominant language
F#
Stars
4.3k
Forks
876
Avg merge
4d 11h
Merged PRs (30d)
131

Description

I would like to be able to inspect the operators using the tooling while typing code, but the parser fumbles on some of those cases, and the completion list never shows the operators:

```fsharp
module Ops =
let (|>>) a b = a + b
module Foo =
let (|>>) a b = a + b
// parser is ok with those:
Ops.Foo.(|>>)
Ops.(|>>)
// parser is not happy with those:
Ops.Foo.(
Ops.(
// those seems recoverable, but there is no tooling assistance in the completion list:
Ops.Foo.()
Ops.()
// it would be great if completion list could show them here also:
Ops.Foo.
Ops.
```

I see two issues:
* parser recovery when there is open paren after a `.`
* completion list is oblivious to custom operators, it makes them impossible to find without looking up the source or documentation (when it exists)

Related #11481

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.