@@ -3297,20 +3297,26 @@ declExpr:
32973297 | BINDER headBindingPattern EQUALS typedSeqExprBlock IN opt_OBLOCKSEP typedSeqExprBlock %prec expr_let
32983298 { let spBind = SequencePointAtBinding(rhs2 parseState 1 5)
32993299 let m = unionRanges (rhs parseState 1) $7.Range
3300- SynExpr.LetOrUseBang(spBind,($1 = "use"),true,$2,$4,$7,m) }
3300+ match $1 with
3301+ | "and" -> SynAndBangExpr.AndBang (spBind,false,true,$2,$4,$7,m)
3302+ | _ -> SynAndBangExpr.NotAndBang (SynExpr.LetOrUseBang(spBind,($1 = "use"),true,$2,$4,$7,m)) }
33013303
33023304 | OBINDER headBindingPattern EQUALS typedSeqExprBlock hardwhiteDefnBindingsTerminator opt_OBLOCKSEP typedSeqExprBlock %prec expr_let
3303- { $5 (if $1 = "use" then "use!" else "let!") (rhs parseState 1) // report unterminated error
3305+ { $5 (match $1 with | "use" -> "use!" | "let" -> "let!" | "and" -> "and !") (rhs parseState 1) // report unterminated error
33043306 let spBind = SequencePointAtBinding(unionRanges (rhs parseState 1) $4.Range)
33053307 let m = unionRanges (rhs parseState 1) $7.Range
3306- SynExpr.LetOrUseBang(spBind,($1 = "use"),true,$2,$4,$7,m) }
3308+ match $1 with
3309+ | "and" -> SynAndBangExpr.AndBang (spBind,false,true,$2,$4,$7,m)
3310+ | _ -> SynAndBangExpr.NotAndBang (SynExpr.LetOrUseBang(spBind,($1 = "use"),true,$2,$4,$7,m)) }
33073311
33083312 | OBINDER headBindingPattern EQUALS typedSeqExprBlock hardwhiteDefnBindingsTerminator opt_OBLOCKSEP error %prec expr_let
33093313 { // error recovery that allows intellisense when writing incomplete computation expressions
33103314 let spBind = SequencePointAtBinding(unionRanges (rhs parseState 1) $4.Range)
33113315 let mAll = unionRanges (rhs parseState 1) (rhs parseState 7)
33123316 let m = $4.Range.EndRange // zero-width range
3313- SynExpr.LetOrUseBang(spBind,($1 = "use"),true,$2,$4, SynExpr.ImplicitZero m, mAll) }
3317+ match $1 with
3318+ | "and" -> SynAndBangExpr.AndBang (spBind,false,true,$2,$4, SynExpr.ImplicitZero m, mAll)
3319+ | _ -> SynAndBangExpr.NotAndBang (SynExpr.LetOrUseBang(spBind,($1 = "use"),true,$2,$4, SynExpr.ImplicitZero m, mAll)) }
33143320
33153321 | DO_BANG typedSeqExpr IN opt_OBLOCKSEP typedSeqExprBlock %prec expr_let
33163322 { let spBind = NoSequencePointAtDoBinding
0 commit comments