Skip to content

Commit 7231ef4

Browse files
committed
Update baselines
1 parent ef47a5e commit 7231ef4

File tree

3 files changed

+33
-6
lines changed

3 files changed

+33
-6
lines changed

src/Compiler/pars.fsy

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3683,9 +3683,10 @@ constrPattern:
36833683
{ let m = unionRanges (rhs parseState 1) $2.Range
36843684
SynPat.IsInst($2, m) }
36853685

3686-
| COLON_QMARK ends_coming_soon_or_recover %prec pat_isinst
3686+
| COLON_QMARK recover %prec pat_isinst
36873687
{ let mColon = rhs parseState 1
3688-
reportParseErrorAt mColon (FSComp.SR.parsExpectingPattern ())
3688+
if not $2 then
3689+
reportParseErrorAt mColon (FSComp.SR.parsExpectingPattern ())
36893690
let ty = SynType.FromParseError(mColon.EndRange)
36903691
SynPat.IsInst(ty, mColon) }
36913692

@@ -3868,9 +3869,10 @@ parenPattern:
38683869
{ let mLhs = lhs parseState
38693870
SynPat.Typed($1, $3, mLhs) }
38703871

3871-
| parenPattern COLON ends_coming_soon_or_recover
3872+
| parenPattern COLON recover
38723873
{ let mColon = rhs parseState 2
3873-
reportParseErrorAt mColon (FSComp.SR.parsExpectingPattern ())
3874+
if not $3 then
3875+
reportParseErrorAt mColon (FSComp.SR.parsExpectingPattern ())
38743876
let ty = SynType.FromParseError(mColon.EndRange)
38753877
SynPat.Typed($1, ty, unionRanges $1.Range mColon) }
38763878

@@ -3882,9 +3884,10 @@ parenPattern:
38823884
{ let mColonColon = rhs parseState 2
38833885
SynPat.ListCons($1, $3, rhs2 parseState 1 3, { ColonColonRange = mColonColon }) }
38843886

3885-
| parenPattern COLON_COLON ends_coming_soon_or_recover
3887+
| parenPattern COLON_COLON recover
38863888
{ let mColonColon = rhs parseState 2
3887-
reportParseErrorAt mColonColon (FSComp.SR.parsExpectingPattern ())
3889+
if not $3 then
3890+
reportParseErrorAt mColonColon (FSComp.SR.parsExpectingPattern ())
38883891
let pat2 = SynPat.Wild(mColonColon.EndRange)
38893892
SynPat.ListCons($1, pat2, rhs2 parseState 1 2, { ColonColonRange = mColonColon }) }
38903893

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module Module
2+
3+
match () with
4+
|
5+
6+
()
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
ImplFile
2+
(ParsedImplFileInput
3+
("/root/MatchClause/Missing pat 05.fs", false, QualifiedNameOfFile Module,
4+
[], [],
5+
[SynModuleOrNamespace
6+
([Module], false, NamedModule,
7+
[Expr
8+
(Match
9+
(Yes (3,0--3,13), Const (Unit, (3,6--3,8)), [], (3,0--4,1),
10+
{ MatchKeyword = (3,0--3,5)
11+
WithKeyword = (3,9--3,13) }), (3,0--4,1));
12+
Expr (Const (Unit, (6,0--6,2)), (6,0--6,2))],
13+
PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None,
14+
(1,0--6,2), { LeadingKeyword = Module (1,0--1,6) })], (true, true),
15+
{ ConditionalDirectives = []
16+
CodeComments = [] }, set []))
17+
18+
(6,0)-(6,1) parse error Incomplete structured construct at or before this point in expression

0 commit comments

Comments
 (0)