Skip to content

Conversation

@auduchinok
Copy link
Member

@auduchinok auduchinok commented Aug 31, 2021

In the following examples ( parens or struct ( were ignored:

let f1 (x

let f2 (x, y

PR makes it properly produce paren patterns.

@auduchinok auduchinok changed the title Parser: produce paren and struct tuple patterns when partially parsed Parser: better tree for unfinished paren and struct tuple patterns Aug 31, 2021
@auduchinok
Copy link
Member Author

auduchinok commented Aug 31, 2021

This is ready. Working on tests.

@auduchinok auduchinok changed the title Parser: better tree for unfinished paren and struct tuple patterns Parser: better tree for unfinished paren patterns Aug 31, 2021
@auduchinok
Copy link
Member Author

This is ready (again).

@dsyme dsyme added the Theme-Simple-F# A cross-community initiative called "Simple F#", keeping people in the sweet spot of the language. label Aug 31, 2021
[<Test>]
let ``Let - Parameter - Paren 02 - Tuple`` () =
let parseResults = getParseResults """
let f (x, y
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a test for

let f (x,

thanks

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also maybe

match () with
| (x, 
| _ -> ()

and

match () with
| (x
| _ -> ()

Copy link
Member Author

@auduchinok auduchinok Aug 31, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dsyme Added for all cases.

Copy link
Contributor

@TIHan TIHan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, should make tooling better in this area for everyone :)

@TIHan TIHan merged commit 64b3354 into dotnet:main Sep 2, 2021
@auduchinok auduchinok deleted the parser-parenPat branch September 3, 2021 06:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Theme-Simple-F# A cross-community initiative called "Simple F#", keeping people in the sweet spot of the language.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants