-
Notifications
You must be signed in to change notification settings - Fork 833
Parser: add recovery for unfinished match clauses #10872
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
Changes from 13 commits
985b85c
7bfec2c
3b74b21
fce6e1b
a42670e
e272ca7
9a17ce4
7e07e12
6a695be
2b82f1b
fcb54ab
bfdde71
434af89
2fbdbbe
8d607c4
97dceff
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| // #Regression #NoMT #FSI | ||
| // Regression test for FSHARP1.0:5629 | ||
| //<Expects status="error" span="(4,6)" id="FS0010">Incomplete structured construct at or before this point in pattern$</Expects> | ||
| //<Expects status="error" span="(4,6)" id="FS0010">Incomplete structured construct at or before this point in binding. Expected '=' or other token.</Expects> | ||
| let f;; | ||
| exit 1;; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -253,6 +253,19 @@ let getSingleModuleLikeDecl (input: ParsedInput) = | |
| | ParsedInput.ImplFile (ParsedImplFileInput (modules = [ decl ])) -> decl | ||
| | _ -> failwith "Could not get module decls" | ||
|
|
||
| let getSingleModuleMemberDecls (input: ParsedInput) = | ||
| match getSingleModuleLikeDecl input with | ||
| | SynModuleOrNamespace (decls = decls) -> decls | ||
|
|
||
| let getSingleExprInModule (input: ParsedInput) = | ||
| match getSingleModuleLikeDecl input with | ||
| | SynModuleOrNamespace (decls = decls) -> | ||
|
||
|
|
||
| match decls with | ||
| | [ SynModuleDecl.DoExpr (_, expr, _) ] -> expr | ||
| | _ -> failwith "Can't get single expression" | ||
|
|
||
|
|
||
| let parseSourceCodeAndGetModule (source: string) = | ||
| parseSourceCode ("test.fsx", source) |> getSingleModuleLikeDecl | ||
|
|
||
|
|
||
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.
maybe call this
mAll