Skip to content

Commit 3cdf2d2

Browse files
authored
Parser: more binary expressions recovery (#15255)
1 parent 0d81a05 commit 3cdf2d2

File tree

11 files changed

+233
-91
lines changed

11 files changed

+233
-91
lines changed

src/Compiler/pars.fsy

Lines changed: 105 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -4024,151 +4024,168 @@ declExpr:
40244024
| declExpr JOIN_IN declExpr
40254025
{ SynExpr.JoinIn($1, rhs parseState 2, $3, unionRanges $1.Range $3.Range) }
40264026

4027+
| declExpr JOIN_IN ends_coming_soon_or_recover
4028+
{ let mOp = rhs parseState 2
4029+
reportParseErrorAt mOp (FSComp.SR.parsUnfinishedExpression "in")
4030+
mkSynInfix mOp $1 "@in" (arbExpr ("declExprInfixJoinIn", mOp.EndRange)) }
4031+
40274032
| declExpr BAR_BAR declExpr
40284033
{ mkSynInfix (rhs parseState 2) $1 "||" $3 }
40294034

4035+
| declExpr BAR_BAR ends_coming_soon_or_recover
4036+
{ let mOp = rhs parseState 2
4037+
reportParseErrorAt mOp (FSComp.SR.parsUnfinishedExpression "||")
4038+
mkSynInfix mOp $1 "||" (arbExpr ("declExprInfixBarBar", mOp.EndRange)) }
4039+
40304040
| declExpr INFIX_BAR_OP declExpr
40314041
{ mkSynInfix (rhs parseState 2) $1 $2 $3 }
40324042

4043+
| declExpr INFIX_BAR_OP ends_coming_soon_or_recover
4044+
{ let mOp = rhs parseState 2
4045+
reportParseErrorAt mOp (FSComp.SR.parsUnfinishedExpression $2)
4046+
mkSynInfix mOp $1 $2 (arbExpr ("declExprInfixBarOp", mOp.EndRange)) }
4047+
40334048
| declExpr OR declExpr
40344049
{ mkSynInfix (rhs parseState 2) $1 "or" $3 }
40354050

4051+
| declExpr OR ends_coming_soon_or_recover
4052+
{ reportParseErrorAt (rhs parseState 2) (FSComp.SR.parsUnfinishedExpression "or")
4053+
mkSynInfix (rhs parseState 2) $1 "or" (arbExpr ("declExprInfixOr", (rhs parseState 3).StartRange)) }
4054+
40364055
| declExpr AMP declExpr
40374056
{ mkSynInfix (rhs parseState 2) $1 "&" $3 }
40384057

4058+
| declExpr AMP ends_coming_soon_or_recover
4059+
{ let mOp = rhs parseState 2
4060+
reportParseErrorAt mOp (FSComp.SR.parsUnfinishedExpression "&")
4061+
mkSynInfix mOp $1 "&" (arbExpr ("declExprInfixAmp", mOp.EndRange)) }
4062+
40394063
| declExpr AMP_AMP declExpr
40404064
{ mkSynInfix (rhs parseState 2) $1 "&&" $3 }
40414065

4066+
| declExpr AMP_AMP ends_coming_soon_or_recover
4067+
{ let mOp = rhs parseState 2
4068+
reportParseErrorAt mOp (FSComp.SR.parsUnfinishedExpression "&&")
4069+
mkSynInfix mOp $1 "&&" (arbExpr ("declExprInfixAmpAmp", mOp.EndRange)) }
4070+
40424071
| declExpr INFIX_AMP_OP declExpr
40434072
{ mkSynInfix (rhs parseState 2) $1 $2 $3 }
40444073

4074+
| declExpr INFIX_AMP_OP ends_coming_soon_or_recover
4075+
{ let mOp = rhs parseState 2
4076+
reportParseErrorAt mOp (FSComp.SR.parsUnfinishedExpression $2)
4077+
mkSynInfix mOp $1 $2 (arbExpr ("declExprInfixAmpOp", (rhs parseState 3).StartRange)) }
4078+
40454079
| declExpr EQUALS declExpr
40464080
{ mkSynInfix (rhs parseState 2) $1 "=" $3 }
40474081

4082+
| declExpr EQUALS ends_coming_soon_or_recover
4083+
{ let mOp = rhs parseState 2
4084+
reportParseErrorAt mOp (FSComp.SR.parsUnfinishedExpression "=")
4085+
mkSynInfix mOp $1 "=" (arbExpr ("declExprInfixEquals", mOp.EndRange)) }
4086+
40484087
| declExpr INFIX_COMPARE_OP declExpr
40494088
{ mkSynInfix (rhs parseState 2) $1 $2 $3 }
40504089

4090+
| declExpr INFIX_COMPARE_OP ends_coming_soon_or_recover
4091+
{ let mOp = rhs parseState 2
4092+
reportParseErrorAt mOp (FSComp.SR.parsUnfinishedExpression $2)
4093+
mkSynInfix mOp $1 $2 (arbExpr ("declExprInfix", mOp.EndRange)) }
4094+
40514095
| declExpr DOLLAR declExpr
40524096
{ mkSynInfix (rhs parseState 2) $1 "$" $3 }
40534097

4098+
| declExpr DOLLAR ends_coming_soon_or_recover
4099+
{ let mOp = rhs parseState 2
4100+
reportParseErrorAt mOp (FSComp.SR.parsUnfinishedExpression "$")
4101+
mkSynInfix mOp $1 "$" (arbExpr ("declExprInfixDollar", mOp.EndRange)) }
4102+
40544103
| declExpr LESS declExpr
40554104
{ mkSynInfix (rhs parseState 2) $1 "<" $3 }
40564105

4057-
| declExpr LESS recover
4058-
{ if not $3 then reportParseErrorAt (rhs parseState 2) (FSComp.SR.parsUnfinishedExpression("<"))
4059-
exprFromParseError (mkSynInfix (rhs parseState 2) $1 "<" (arbExpr ("declExprInfix", (rhs parseState 3).StartRange))) }
4106+
| declExpr LESS ends_coming_soon_or_recover
4107+
{ let mOp = rhs parseState 2
4108+
reportParseErrorAt mOp (FSComp.SR.parsUnfinishedExpression "<")
4109+
mkSynInfix mOp $1 "<" (arbExpr ("declExprInfixLess", mOp.EndRange)) }
40604110

40614111
| declExpr GREATER declExpr
40624112
{ mkSynInfix (rhs parseState 2) $1 ">" $3 }
40634113

4114+
| declExpr GREATER ends_coming_soon_or_recover
4115+
{ let mOp = rhs parseState 2
4116+
reportParseErrorAt mOp (FSComp.SR.parsUnfinishedExpression ">")
4117+
mkSynInfix mOp $1 ">" (arbExpr ("declExprInfixGreater", mOp.EndRange)) }
4118+
40644119
| declExpr INFIX_AT_HAT_OP declExpr
40654120
{ mkSynInfix (rhs parseState 2) $1 $2 $3 }
40664121

4122+
| declExpr INFIX_AT_HAT_OP ends_coming_soon_or_recover %prec infix_at_hat_op_binary
4123+
{ let mOp = rhs parseState 2
4124+
reportParseErrorAt mOp (FSComp.SR.parsUnfinishedExpression $2)
4125+
mkSynInfix mOp $1 $2 (arbExpr ("declExprInfix", mOp.EndRange)) }
4126+
40674127
| declExpr PERCENT_OP declExpr
40684128
{ mkSynInfix (rhs parseState 2) $1 $2 $3 }
40694129

4130+
| declExpr PERCENT_OP ends_coming_soon_or_recover
4131+
{ let mOp = rhs parseState 2
4132+
reportParseErrorAt mOp (FSComp.SR.parsUnfinishedExpression $2)
4133+
mkSynInfix mOp $1 $2 (arbExpr ("declExprInfixPercent", mOp.EndRange)) }
4134+
40704135
| declExpr COLON_COLON declExpr
4071-
{ let tupExpr = SynExpr.Tuple(false, [$1;$3], [rhs parseState 2], unionRanges $1.Range $3.Range)
4072-
let identExpr = mkSynOperator (rhs parseState 2) "::"
4073-
SynExpr.App(ExprAtomicFlag.NonAtomic, true, identExpr, tupExpr, unionRanges $1.Range $3.Range) }
4136+
{ let mOp = rhs parseState 2
4137+
let m = unionRanges $1.Range $3.Range
4138+
let tupExpr = SynExpr.Tuple(false, [$1; $3], [mOp], m)
4139+
let identExpr = mkSynOperator mOp "::"
4140+
SynExpr.App(ExprAtomicFlag.NonAtomic, true, identExpr, tupExpr, m) }
4141+
4142+
| declExpr COLON_COLON ends_coming_soon_or_recover
4143+
{ let mOp = rhs parseState 2
4144+
let m = unionRanges $1.Range mOp
4145+
reportParseErrorAt mOp (FSComp.SR.parsUnfinishedExpression "::")
4146+
let identExpr = mkSynOperator mOp "::"
4147+
let tupExpr = SynExpr.Tuple(false, [$1; (arbExpr ("declExprInfixColonColon", mOp.EndRange))], [mOp], m)
4148+
SynExpr.App(ExprAtomicFlag.NonAtomic, true, identExpr, tupExpr, m) }
40744149

40754150
| declExpr PLUS_MINUS_OP declExpr
40764151
{ mkSynInfix (rhs parseState 2) $1 $2 $3 }
40774152

4153+
| declExpr PLUS_MINUS_OP ends_coming_soon_or_recover
4154+
{ let mOp = rhs parseState 2
4155+
reportParseErrorAt mOp (FSComp.SR.parsUnfinishedExpression $2)
4156+
mkSynInfix mOp $1 $2 (arbExpr ("declExprInfixPlusMinus", mOp.EndRange)) }
4157+
40784158
| declExpr MINUS declExpr
40794159
{ mkSynInfix (rhs parseState 2) $1 "-" $3 }
40804160

4161+
| declExpr MINUS ends_coming_soon_or_recover
4162+
{ let mOp = rhs parseState 2
4163+
reportParseErrorAt mOp (FSComp.SR.parsUnfinishedExpression "-")
4164+
mkSynInfix mOp $1 "-" (arbExpr ("declExprInfixMinus", mOp.EndRange)) }
4165+
40814166
| declExpr STAR declExpr
40824167
{ mkSynInfix (rhs parseState 2) $1 "*" $3 }
40834168

4169+
| declExpr STAR ends_coming_soon_or_recover
4170+
{ let mOp = rhs parseState 2
4171+
reportParseErrorAt mOp (FSComp.SR.parsUnfinishedExpression "*")
4172+
mkSynInfix mOp $1 "*" (arbExpr ("declExprInfixStar", mOp.EndRange)) }
4173+
40844174
| declExpr INFIX_STAR_DIV_MOD_OP declExpr
40854175
{ mkSynInfix (rhs parseState 2) $1 $2 $3 }
40864176

4177+
| declExpr INFIX_STAR_DIV_MOD_OP ends_coming_soon_or_recover
4178+
{ let mOp = rhs parseState 2
4179+
reportParseErrorAt mOp (FSComp.SR.parsUnfinishedExpression $2)
4180+
mkSynInfix mOp $1 $2 (arbExpr ("declExprInfixStarDivMod", mOp.EndRange)) }
4181+
40874182
| declExpr INFIX_STAR_STAR_OP declExpr
40884183
{ mkSynInfix (rhs parseState 2) $1 $2 $3 }
40894184

4090-
| declExpr JOIN_IN OBLOCKEND_COMING_SOON
4091-
{ reportParseErrorAt (rhs parseState 2) (FSComp.SR.parsUnfinishedExpression("in"))
4092-
exprFromParseError(mkSynInfix (rhs parseState 2) $1 "@in" (arbExpr ("declExprInfix", (rhs parseState 3).StartRange))) }
4093-
4094-
| declExpr BAR_BAR OBLOCKEND_COMING_SOON
4095-
{ reportParseErrorAt (rhs parseState 2) (FSComp.SR.parsUnfinishedExpression("||"))
4096-
exprFromParseError(mkSynInfix (rhs parseState 2) $1 "||" (arbExpr ("declExprInfix", (rhs parseState 3).StartRange))) }
4097-
4098-
| declExpr INFIX_BAR_OP OBLOCKEND_COMING_SOON
4099-
{ reportParseErrorAt (rhs parseState 2) (FSComp.SR.parsUnfinishedExpression($2))
4100-
exprFromParseError(mkSynInfix (rhs parseState 2) $1 $2 (arbExpr ("declExprInfix", (rhs parseState 3).StartRange))) }
4101-
4102-
| declExpr OR OBLOCKEND_COMING_SOON
4103-
{ reportParseErrorAt (rhs parseState 2) (FSComp.SR.parsUnfinishedExpression("or"))
4104-
exprFromParseError(mkSynInfix (rhs parseState 2) $1 "or" (arbExpr ("declExprInfix", (rhs parseState 3).StartRange))) }
4105-
4106-
| declExpr AMP OBLOCKEND_COMING_SOON
4107-
{ reportParseErrorAt (rhs parseState 2) (FSComp.SR.parsUnfinishedExpression("&"))
4108-
exprFromParseError(mkSynInfix (rhs parseState 2) $1 "&" (arbExpr ("declExprInfix", (rhs parseState 3).StartRange))) }
4109-
4110-
| declExpr AMP_AMP OBLOCKEND_COMING_SOON
4111-
{ reportParseErrorAt (rhs parseState 2) (FSComp.SR.parsUnfinishedExpression("&&"))
4112-
exprFromParseError(mkSynInfix (rhs parseState 2) $1 "&&" (arbExpr ("declExprInfix", (rhs parseState 3).StartRange))) }
4113-
4114-
| declExpr INFIX_AMP_OP OBLOCKEND_COMING_SOON
4115-
{ reportParseErrorAt (rhs parseState 2) (FSComp.SR.parsUnfinishedExpression($2))
4116-
exprFromParseError(mkSynInfix (rhs parseState 2) $1 $2 (arbExpr ("declExprInfix", (rhs parseState 3).StartRange))) }
4117-
4118-
| declExpr EQUALS ends_coming_soon_or_recover
4119-
{ reportParseErrorAt (rhs parseState 2) (FSComp.SR.parsUnfinishedExpression("="))
4120-
let mEquals = rhs parseState 2
4121-
mkSynInfix mEquals $1 "=" (arbExpr ("declExprInfixEquals", mEquals.EndRange)) }
4122-
4123-
| declExpr INFIX_COMPARE_OP OBLOCKEND_COMING_SOON
4124-
{ reportParseErrorAt (rhs parseState 2) (FSComp.SR.parsUnfinishedExpression($2))
4125-
exprFromParseError(mkSynInfix (rhs parseState 2) $1 $2 (arbExpr ("declExprInfix", (rhs parseState 3).StartRange))) }
4126-
4127-
| declExpr DOLLAR OBLOCKEND_COMING_SOON
4128-
{ reportParseErrorAt (rhs parseState 2) (FSComp.SR.parsUnfinishedExpression("$"))
4129-
exprFromParseError(mkSynInfix (rhs parseState 2) $1 "$" (arbExpr ("declExprInfix", (rhs parseState 3).StartRange))) }
4130-
4131-
| declExpr LESS OBLOCKEND_COMING_SOON
4132-
{ reportParseErrorAt (rhs parseState 2) (FSComp.SR.parsUnfinishedExpression("<"))
4133-
exprFromParseError(mkSynInfix (rhs parseState 2) $1 "<" (arbExpr ("declExprInfix", (rhs parseState 3).StartRange))) }
4134-
4135-
| declExpr GREATER OBLOCKEND_COMING_SOON
4136-
{ reportParseErrorAt (rhs parseState 2) (FSComp.SR.parsUnfinishedExpression(">"))
4137-
exprFromParseError(mkSynInfix (rhs parseState 2) $1 ">" (arbExpr ("declExprInfix", (rhs parseState 3).StartRange))) }
4138-
4139-
| declExpr INFIX_AT_HAT_OP OBLOCKEND_COMING_SOON %prec infix_at_hat_op_binary
4140-
{ reportParseErrorAt (rhs parseState 2) (FSComp.SR.parsUnfinishedExpression($2))
4141-
exprFromParseError(mkSynInfix (rhs parseState 2) $1 $2 (arbExpr ("declExprInfix", (rhs parseState 3).StartRange))) }
4142-
4143-
| declExpr PERCENT_OP OBLOCKEND_COMING_SOON
4144-
{ reportParseErrorAt (rhs parseState 2) (FSComp.SR.parsUnfinishedExpression($2))
4145-
exprFromParseError(mkSynInfix (rhs parseState 2) $1 $2 (arbExpr ("declExprInfix", (rhs parseState 3).StartRange))) }
4146-
4147-
| declExpr COLON_COLON OBLOCKEND_COMING_SOON
4148-
{ reportParseErrorAt (rhs parseState 2) (FSComp.SR.parsUnfinishedExpression("::"))
4149-
let identExpr = mkSynOperator (rhs parseState 2) "::"
4150-
let tupExpr = SynExpr.Tuple(false, [$1;(arbExpr ("declExprInfix", (rhs parseState 3).StartRange))], [rhs parseState 2], unionRanges $1.Range (rhs parseState 3).StartRange)
4151-
SynExpr.App(ExprAtomicFlag.NonAtomic, true, identExpr, tupExpr, unionRanges $1.Range (rhs parseState 3).StartRange) }
4152-
4153-
| declExpr PLUS_MINUS_OP OBLOCKEND_COMING_SOON
4154-
{ reportParseErrorAt (rhs parseState 2) (FSComp.SR.parsUnfinishedExpression($2))
4155-
exprFromParseError(mkSynInfix (rhs parseState 2) $1 $2 (arbExpr ("declExprInfix", (rhs parseState 3).StartRange))) }
4156-
4157-
| declExpr MINUS OBLOCKEND_COMING_SOON
4158-
{ reportParseErrorAt (rhs parseState 2) (FSComp.SR.parsUnfinishedExpression("-"))
4159-
exprFromParseError(mkSynInfix (rhs parseState 2) $1 "-" (arbExpr ("declExprInfix", (rhs parseState 3).StartRange))) }
4160-
4161-
| declExpr STAR OBLOCKEND_COMING_SOON
4162-
{ reportParseErrorAt (rhs parseState 2) (FSComp.SR.parsUnfinishedExpression("*"))
4163-
exprFromParseError(mkSynInfix (rhs parseState 2) $1 "*" (arbExpr ("declExprInfix", (rhs parseState 3).StartRange))) }
4164-
4165-
| declExpr INFIX_STAR_DIV_MOD_OP OBLOCKEND_COMING_SOON
4166-
{ reportParseErrorAt (rhs parseState 2) (FSComp.SR.parsUnfinishedExpression($2))
4167-
exprFromParseError(mkSynInfix (rhs parseState 2) $1 $2 (arbExpr ("declExprInfix", (rhs parseState 3).StartRange))) }
4168-
4169-
| declExpr INFIX_STAR_STAR_OP OBLOCKEND_COMING_SOON
4170-
{ reportParseErrorAt (rhs parseState 2) (FSComp.SR.parsUnfinishedExpression($2))
4171-
exprFromParseError(mkSynInfix (rhs parseState 2) $1 $2 (arbExpr ("declExprInfix", (rhs parseState 3).StartRange))) }
4185+
| declExpr INFIX_STAR_STAR_OP ends_coming_soon_or_recover
4186+
{ let mOp = rhs parseState 2
4187+
reportParseErrorAt mOp (FSComp.SR.parsUnfinishedExpression $2)
4188+
mkSynInfix mOp $1 $2 (arbExpr ("declExprInfixStarStar", mOp.EndRange)) }
41724189

41734190
| declExpr DOT_DOT declExpr
41744191
{ let wholem = rhs2 parseState 1 3

tests/fsharpqa/Source/Conformance/LexicalAnalysis/Comments/E_ocamlstyle_nested007.fs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
// Since OCaml-style comments are now gone, this is going to be a negative test
55
//<Expects id="FS0010" span="(12,47)" status="error">Unexpected string literal in binding\. Expected incomplete structured construct at or before this point or other token\.$</Expects>
66
//<Expects status="error" span="(10,1)" id="FS3118">Incomplete value or function definition\. If this is in an expression, the body of the expression must be indented to the same column as the 'let' keyword\.$</Expects>
7-
//<Expects id="FS0010" span="(23,1)" status="error">Incomplete structured construct at or before this point in implementation file$</Expects>
8-
7+
//<Expects id="FS3156" span="(14,19)" status="error">Unexpected token '\*' or incomplete expression</Expects>
8+
//<Expects id="FS0010" span="(14,20)" status="error">Unexpected symbol '\)' in implementation file</Expects>
99

1010
let y7a = (** This is a comment with "(***)" *) 1 (**) + 2"
1111

tests/fsharpqa/Source/Conformance/UnitsOfMeasure/Parenthesis/E_IncompleteParens02.fs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
// #Regression #Conformance #UnitsOfMeasure
22
// Regression test for FSHARP1.0:2662
33
// Make sure we can use ( and ) in Units of Measure
4-
//<Expects status="error" span="(10,26-10,27)" id="FS0010">Unexpected symbol '\)' in expression$</Expects>
4+
//<Expects status="error" span="(11,26-11,27)" id="FS0010">Unexpected symbol '\)' in binding\. Expected incomplete structured construct at or before this point or other token\.</Expects>
5+
//<Expects status="error" span="(11,24-11,25)" id="FS3156">Unexpected token '/' or incomplete expression</Expects>
56

67
[<Measure>] type Kg
78
[<Measure>] type m
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module Module
2+
3+
a + b
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
ImplFile
2+
(ParsedImplFileInput
3+
("/root/Expression/Binary - Plus 01.fs", false, QualifiedNameOfFile Module,
4+
[], [],
5+
[SynModuleOrNamespace
6+
([Module], false, NamedModule,
7+
[Expr
8+
(App
9+
(NonAtomic, false,
10+
App
11+
(NonAtomic, true,
12+
LongIdent
13+
(false,
14+
SynLongIdent
15+
([op_Addition], [], [Some (OriginalNotation "+")]),
16+
None, (3,2--3,3)), Ident a, (3,0--3,3)), Ident b,
17+
(3,0--3,5)), (3,0--3,5))],
18+
PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None,
19+
(1,0--3,5), { LeadingKeyword = Module (1,0--1,6) })], (true, true),
20+
{ ConditionalDirectives = []
21+
CodeComments = [] }, set []))
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module Module
2+
3+
a +
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
ImplFile
2+
(ParsedImplFileInput
3+
("/root/Expression/Binary - Plus 02.fs", false, QualifiedNameOfFile Module,
4+
[], [],
5+
[SynModuleOrNamespace
6+
([Module], false, NamedModule,
7+
[Expr
8+
(App
9+
(NonAtomic, false,
10+
App
11+
(NonAtomic, true,
12+
LongIdent
13+
(false,
14+
SynLongIdent
15+
([op_Addition], [], [Some (OriginalNotation "+")]),
16+
None, (3,2--3,3)), Ident a, (3,0--3,3)),
17+
ArbitraryAfterError ("declExprInfixPlusMinus", (3,3--3,3)),
18+
(3,0--3,3)), (3,0--3,3))],
19+
PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None,
20+
(1,0--3,3), { LeadingKeyword = Module (1,0--1,6) })], (true, true),
21+
{ ConditionalDirectives = []
22+
CodeComments = [] }, set []))
23+
24+
(4,0)-(4,0) parse warning Possible incorrect indentation: this token is offside of context started at position (3:1). Try indenting this token further or using standard formatting conventions.
25+
(3,2)-(3,3) parse error Unexpected token '+' or incomplete expression
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module Module
2+
3+
M(a + )
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
ImplFile
2+
(ParsedImplFileInput
3+
("/root/Expression/Binary - Plus 03.fs", false, QualifiedNameOfFile Module,
4+
[], [],
5+
[SynModuleOrNamespace
6+
([Module], false, NamedModule,
7+
[Expr
8+
(App
9+
(Atomic, false, Ident M,
10+
Paren
11+
(App
12+
(NonAtomic, false,
13+
App
14+
(NonAtomic, true,
15+
LongIdent
16+
(false,
17+
SynLongIdent
18+
([op_Addition], [], [Some (OriginalNotation "+")]),
19+
None, (3,4--3,5)), Ident a, (3,2--3,5)),
20+
ArbitraryAfterError
21+
("declExprInfixPlusMinus", (3,5--3,5)), (3,2--3,5)),
22+
(3,1--3,2), Some (3,6--3,7), (3,1--3,7)), (3,0--3,7)),
23+
(3,0--3,7))],
24+
PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None,
25+
(1,0--3,7), { LeadingKeyword = Module (1,0--1,6) })], (true, true),
26+
{ ConditionalDirectives = []
27+
CodeComments = [] }, set []))
28+
29+
(3,4)-(3,5) parse error Unexpected token '+' or incomplete expression
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module Module
2+
3+
a +
4+
|> ()

0 commit comments

Comments
 (0)