diff --git a/docs/release-notes/.FSharp.Compiler.Service/10.0.100.md b/docs/release-notes/.FSharp.Compiler.Service/10.0.100.md index 7256a47504c..ab9f379f87b 100644 --- a/docs/release-notes/.FSharp.Compiler.Service/10.0.100.md +++ b/docs/release-notes/.FSharp.Compiler.Service/10.0.100.md @@ -30,3 +30,135 @@ * Mark `Range.Zero` as obsolete in favor of `Range.range0` ([PR #18664](https://github.com/dotnet/fsharp/pull/18664)) * Use `Synbinding` to model `and!` ([PR #18805](https://github.com/dotnet/fsharp/pull/18805)) * Redesign #line processing. The original positions (unaffected by #line directives) are now kept in the AST, and `__LINE__` and `__SOURCE_LINE__` show the original line numbers / file names. However, all diagnostics and debug information stays the same (shows the position transformed by the #line directives). ([Issue #18553](https://github.com/dotnet/fsharp/issues/18553), [PR #18699](https://github.com/dotnet/fsharp/pull/18699)) +* Unify `let`, `let!`, `use` and `use!` AST representation. ([PR #18825](https://github.com/dotnet/fsharp/pull/18825))[^1] + +### Migration Guidance for AST Users + +**Note:** The unified AST introduces two new boolean fields: +- `isFromSource`: Indicates if the binding comes from user-written code (`true`) or is compiler-generated (`false`) +- `isBang`: Distinguishes computation expression bindings (`let!`/`use!` = `true`) from regular bindings (`let`/`use` = `false`) + +### 1. Pattern Matching Updates + +**Before:** +```fsharp +match expr with +| SynExpr.LetOrUse(isRec, isUse, bindings, body, range, trivia) -> + // Handle regular let/use +| SynExpr.LetOrUseBang(spBind, isUse, isFromSource, pat, rhs, andBangs, body, range, trivia) -> + // Handle let!/use! +``` + +**After:** +```fsharp +match expr with +| SynExpr.LetOrUse(isRec, isUse, isFromSource, isBang, bindings, body, range, trivia) -> + if isBang then + // This is a let!/use! expression + match bindings with + | firstBinding :: andBangs -> + match firstBinding with + | SynBinding(headPat = pat; expr = rhs) -> + // pat and rhs extracted from first binding + // andBangs contains the and! bindings + | [] -> // error case + else + // This is a regular let/use expression +``` + +### 2. Construction Updates + +**Before:** +```fsharp +// Creating a let! expression +SynExpr.LetOrUseBang( + bindDebugPoint, + false, // isUse + true, // isFromSource + pat, + rhsExpr, + andBangs, + bodyExpr, + range, + trivia +) +``` + +**After:** +```fsharp +// Creating a let! expression +let firstBinding = SynBinding( + accessibility = None, + kind = SynBindingKind.Normal, + isInline = false, + isMutable = false, + attributes = [], + xmlDoc = PreXmlDoc.Empty, + valData = SynInfo.emptySynValData, + headPat = pat, // Pattern moved here + returnInfo = None, + expr = rhsExpr, // RHS moved here + range = range, + debugPoint = bindDebugPoint, // Debug point moved here + trivia = bindingTrivia +) +SynExpr.LetOrUse( + false, // isRecursive + false, // isUse + true, // isFromSource + true, // isBang (indicates let!) + firstBinding :: andBangs, // All bindings in single list + bodyExpr, + range, + trivia +) +``` + +### 3. Common Migration Patterns + +**Checking for computation expressions:** +```fsharp +// Before +match expr with +| SynExpr.LetOrUseBang _ -> true +| _ -> false + +// After +match expr with +| SynExpr.LetOrUse(isBang = true) -> true +| _ -> false +``` + +**Extracting pattern and expression from let!:** +```fsharp +// Before +| SynExpr.LetOrUseBang(_, _, _, pat, rhs, _, _, _, _) -> + processBinding pat rhs + +// After +| SynExpr.LetOrUse(isBang = true; bindings = binding :: _) -> + match binding with + | SynBinding(headPat = pat; expr = rhs) -> + processBinding pat rhs + | _ -> // error +``` + +**Processing and! bindings:** +```fsharp +// Before +| SynExpr.LetOrUseBang(_, _, _, firstPat, firstRhs, andBangs, _, _, _) -> + processFirst firstPat firstRhs + for andBang in andBangs do + processAndBang andBang + +// After +| SynExpr.LetOrUse(isBang = true; bindings = bindings) -> + match bindings with + | first :: rest -> + processBinding first + for andBang in rest do + processAndBang andBang + | [] -> // error +``` + +[^1]: See [Migration Guidance for AST Users](#migration-guidance-for-ast-users) section for detailed information on how to update your code to work with the unified AST representation. \ No newline at end of file diff --git a/src/Compiler/Checking/CheckRecordSyntaxHelpers.fs b/src/Compiler/Checking/CheckRecordSyntaxHelpers.fs index 697e9a14623..861ad5587c6 100644 --- a/src/Compiler/Checking/CheckRecordSyntaxHelpers.fs +++ b/src/Compiler/Checking/CheckRecordSyntaxHelpers.fs @@ -180,4 +180,13 @@ let BindOriginalRecdExpr (withExpr: SynExpr * BlockSeparator) mkRecdExpr = None, SynBindingTrivia.Zero) - SynExpr.LetOrUse(false, false, [ binding ], mkRecdExpr (Some withExpr), mOrigExprSynth, SynExprLetOrUseTrivia.Zero) + SynExpr.LetOrUse( + isRecursive = false, + isUse = false, + isFromSource = false, // compiler generated during desugaring + isBang = false, + bindings = [ binding ], + body = mkRecdExpr (Some withExpr), + range = mOrigExprSynth, + trivia = SynExprLetOrUseTrivia.Zero + ) diff --git a/src/Compiler/Checking/Expressions/CheckComputationExpressions.fs b/src/Compiler/Checking/Expressions/CheckComputationExpressions.fs index 799fef2a038..1f31414599d 100644 --- a/src/Compiler/Checking/Expressions/CheckComputationExpressions.fs +++ b/src/Compiler/Checking/Expressions/CheckComputationExpressions.fs @@ -20,6 +20,7 @@ open FSharp.Compiler.NameResolution open FSharp.Compiler.Syntax.PrettyNaming open FSharp.Compiler.Syntax open FSharp.Compiler.SyntaxTrivia +open FSharp.Compiler.Xml open FSharp.Compiler.SyntaxTreeOps open FSharp.Compiler.Text open FSharp.Compiler.Text.Range @@ -856,29 +857,33 @@ let (|OptionalSequential|) e = [] let (|ExprAsUseBang|_|) expr = match expr with - | SynExpr.LetOrUseBang( - bindDebugPoint = spBind + | SynExpr.LetOrUse( isUse = true isFromSource = isFromSource - pat = pat - rhs = rhsExpr - andBangs = andBangs + isBang = true + bindings = bindings body = innerComp - trivia = { LetOrUseKeyword = mBind }) -> ValueSome(spBind, isFromSource, pat, rhsExpr, andBangs, innerComp, mBind) + trivia = { LetOrUseKeyword = mBind }) -> + match bindings with + | SynBinding(debugPoint = spBind; headPat = pat; expr = rhsExpr) :: andBangs -> + ValueSome(spBind, isFromSource, pat, rhsExpr, andBangs, innerComp, mBind) + | _ -> ValueNone | _ -> ValueNone [] let (|ExprAsLetBang|_|) expr = match expr with - | SynExpr.LetOrUseBang( - bindDebugPoint = spBind + | SynExpr.LetOrUse( isUse = false isFromSource = isFromSource - pat = letPat - rhs = letRhsExpr - andBangs = andBangBindings + isBang = true + bindings = bindings body = innerComp - trivia = { LetOrUseKeyword = mBind }) -> ValueSome(spBind, isFromSource, letPat, letRhsExpr, andBangBindings, innerComp, mBind) + trivia = { LetOrUseKeyword = mBind }) -> + match bindings with + | SynBinding(debugPoint = spBind; headPat = letPat; expr = letRhsExpr) :: andBangBindings -> + ValueSome(spBind, isFromSource, letPat, letRhsExpr, andBangBindings, innerComp, mBind) + | _ -> ValueNone | _ -> ValueNone // "cexpr; cexpr" is treated as builder.Combine(cexpr1, cexpr1) @@ -1392,17 +1397,33 @@ let rec TryTranslateComputationExpression let setCondExpr = SynExpr.Set(SynExpr.Ident idCond, SynExpr.Ident idFirst, mGuard) + let binding = + SynBinding( + accessibility = None, + kind = SynBindingKind.Normal, + isInline = false, + isMutable = false, + attributes = [], + xmlDoc = PreXmlDoc.Empty, + valData = SynInfo.emptySynValData, + headPat = patFirst, + returnInfo = None, + expr = guardExpr, + range = guardExpr.Range, + debugPoint = DebugPointAtBinding.NoneAtSticky, + trivia = SynBindingTrivia.Zero + ) + let bindCondExpr = - SynExpr.LetOrUseBang( - DebugPointAtBinding.NoneAtSticky, - false, - true, - patFirst, - guardExpr, - [], - setCondExpr, - mGuard, - SynExprLetOrUseTrivia.Zero + SynExpr.LetOrUse( + isRecursive = false, + isUse = false, + isFromSource = true, // compiler generated during desugaring + isBang = true, + bindings = [ binding ], + body = setCondExpr, + range = mGuard, + trivia = SynExprLetOrUseTrivia.Zero ) let whileExpr = @@ -1420,18 +1441,43 @@ let rec TryTranslateComputationExpression mOrig ) - SynExpr.LetOrUse(false, false, [ condBinding ], whileExpr, mGuard, SynExprLetOrUseTrivia.Zero) + SynExpr.LetOrUse( + isRecursive = false, + isUse = false, + isFromSource = false, // compiler generated during desugaring + isBang = false, + bindings = [ condBinding ], + body = whileExpr, + range = mGuard, + trivia = SynExprLetOrUseTrivia.Zero + ) - SynExpr.LetOrUseBang( - DebugPointAtBinding.NoneAtSticky, - false, - true, - patFirst, - guardExpr, - [], - body, - mGuard, - SynExprLetOrUseTrivia.Zero + let binding = + SynBinding( + accessibility = None, + kind = SynBindingKind.Normal, + isInline = false, + isMutable = false, + attributes = [], + xmlDoc = PreXmlDoc.Empty, + valData = SynInfo.emptySynValData, + headPat = patFirst, + returnInfo = None, + expr = guardExpr, + range = guardExpr.Range, + debugPoint = DebugPointAtBinding.NoneAtSticky, + trivia = SynBindingTrivia.Zero + ) + + SynExpr.LetOrUse( + isRecursive = false, + isUse = false, + isFromSource = true, // compiler generated during desugaring + isBang = true, + bindings = [ binding ], + body = body, + range = mGuard, + trivia = SynExprLetOrUseTrivia.Zero ) TryTranslateComputationExpression ceenv CompExprTranslationPass.Initial q varSpace rewrittenWhileExpr translatedCtxt @@ -1620,22 +1666,38 @@ let rec TryTranslateComputationExpression | DebugPointAtSequential.SuppressStmt -> DebugPointAtBinding.Yes m | DebugPointAtSequential.SuppressNeither -> DebugPointAtBinding.Yes m + let binding = + SynBinding( + accessibility = None, + kind = SynBindingKind.Normal, + isInline = false, + isMutable = false, + attributes = [], + xmlDoc = PreXmlDoc.Empty, + valData = SynInfo.emptySynValData, + headPat = SynPat.Const(SynConst.Unit, rhsExpr.Range), + returnInfo = None, + expr = rhsExpr, + range = rhsExpr.Range, + debugPoint = sp, + trivia = SynBindingTrivia.Zero + ) + Some( TranslateComputationExpression ceenv CompExprTranslationPass.Initial q varSpace - (SynExpr.LetOrUseBang( - sp, - false, - true, - SynPat.Const(SynConst.Unit, rhsExpr.Range), - rhsExpr, - [], - innerComp2, - m, - SynExprLetOrUseTrivia.Zero + (SynExpr.LetOrUse( + isRecursive = false, + isUse = false, + isFromSource = true, // compiler generated during desugaring + isBang = true, + bindings = [ binding ], + body = innerComp2, + range = m, + trivia = SynExprLetOrUseTrivia.Zero )) translatedCtxt ) @@ -1704,7 +1766,15 @@ let rec TryTranslateComputationExpression ) // 'let binds in expr' - | SynExpr.LetOrUse(isRec, false, binds, innerComp, m, trivia) -> + | SynExpr.LetOrUse( + isRecursive = isRec + isUse = false + isFromSource = isFromSource + isBang = false + bindings = binds + body = innerComp + range = m + trivia = trivia) -> // For 'query' check immediately if ceenv.isQuery then @@ -1737,12 +1807,24 @@ let rec TryTranslateComputationExpression Some( TranslateComputationExpression ceenv CompExprTranslationPass.Initial q varSpace innerComp (fun holeFill -> - translatedCtxt (SynExpr.LetOrUse(isRec, false, binds, holeFill, m, trivia))) + translatedCtxt ( + SynExpr.LetOrUse( + isRecursive = isRec, + isUse = false, + isFromSource = isFromSource, + isBang = false, + bindings = binds, + body = holeFill, + range = m, + trivia = trivia + ) + )) ) // 'use x = expr in expr' | SynExpr.LetOrUse( isUse = true + isBang = false bindings = [ SynBinding(kind = SynBindingKind.Normal; headPat = pat; expr = rhsExpr; debugPoint = spBind) ] body = innerComp trivia = { LetOrUseKeyword = mBind }) -> @@ -2365,16 +2447,32 @@ and ConsumeCustomOpClauses // Rebind using either for ... or let!.... let rebind = if maintainsVarSpaceUsingBind then - SynExpr.LetOrUseBang( - DebugPointAtBinding.NoneAtLet, - false, - false, - intoPat, - dataCompAfterOp, - [], - contExpr, - intoPat.Range, - SynExprLetOrUseTrivia.Zero + let binding = + SynBinding( + accessibility = None, + kind = SynBindingKind.Normal, + isInline = false, + isMutable = false, + attributes = [], + xmlDoc = PreXmlDoc.Empty, + valData = SynInfo.emptySynValData, + headPat = intoPat, + returnInfo = None, + expr = dataCompAfterOp, + range = dataCompAfterOp.Range, + debugPoint = DebugPointAtBinding.NoneAtLet, + trivia = SynBindingTrivia.Zero + ) + + SynExpr.LetOrUse( + isRecursive = false, + isUse = false, + isFromSource = false, // compiler generated during desugaring + isBang = true, + bindings = [ binding ], + body = contExpr, + range = intoPat.Range, + trivia = SynExprLetOrUseTrivia.Zero ) else SynExpr.ForEach( @@ -2406,16 +2504,32 @@ and ConsumeCustomOpClauses // Rebind using either for ... or let!.... let rebind = if lastUsesBind then - SynExpr.LetOrUseBang( - DebugPointAtBinding.NoneAtLet, - false, - false, - varSpacePat, - dataCompPrior, - [], - compClausesExpr, - compClausesExpr.Range, - SynExprLetOrUseTrivia.Zero + let binding = + SynBinding( + accessibility = None, + kind = SynBindingKind.Normal, + isInline = false, + isMutable = false, + attributes = [], + xmlDoc = PreXmlDoc.Empty, + valData = SynInfo.emptySynValData, + headPat = varSpacePat, + returnInfo = None, + expr = dataCompPrior, + range = dataCompPrior.Range, + debugPoint = DebugPointAtBinding.NoneAtLet, + trivia = SynBindingTrivia.Zero + ) + + SynExpr.LetOrUse( + isRecursive = false, + isUse = false, + isFromSource = false, // compiler generated during desugaring + isBang = true, + bindings = [ binding ], + body = compClausesExpr, + range = compClausesExpr.Range, + trivia = SynExprLetOrUseTrivia.Zero ) else SynExpr.ForEach( @@ -2546,11 +2660,32 @@ and convertSimpleReturnToExpr (ceenv: ComputationExpressionContext<'a>) comp var | Some elseExprOpt -> Some(SynExpr.IfThenElse(guardExpr, thenExpr, elseExprOpt, spIfToThen, isRecovery, mIfToEndOfElseBranch, trivia), None) - | SynExpr.LetOrUse(isRec, false, binds, innerComp, m, trivia) -> + | SynExpr.LetOrUse( + isRecursive = isRec + isUse = false + isFromSource = isFromSource + isBang = false + bindings = binds + body = innerComp + range = m + trivia = trivia) -> match convertSimpleReturnToExpr ceenv comp varSpace innerComp with | None -> None | Some(_, Some _) -> None - | Some(innerExpr, None) -> Some(SynExpr.LetOrUse(isRec, false, binds, innerExpr, m, trivia), None) + | Some(innerExpr, None) -> + Some( + SynExpr.LetOrUse( + isRecursive = isRec, + isUse = false, + isFromSource = isFromSource, + isBang = false, + bindings = binds, + body = innerExpr, + range = m, + trivia = trivia + ), + None + ) | OptionalSequential(CustomOperationClause ceenv (nm, _, _, mClause, _), _) when customOperationMaintainsVarSpaceUsingBind ceenv nm -> @@ -2591,8 +2726,8 @@ and isSimpleExpr ceenv comp = && (match elseCompOpt with | None -> true | Some c -> isSimpleExpr ceenv c) - | SynExpr.LetOrUse(body = innerComp) -> isSimpleExpr ceenv innerComp - | SynExpr.LetOrUseBang _ -> false + | SynExpr.LetOrUse(isBang = false; body = innerComp) -> isSimpleExpr ceenv innerComp + | SynExpr.LetOrUse(isBang = true) -> false | SynExpr.Match(clauses = clauses) -> clauses |> List.forall (fun (SynMatchClause(resultExpr = innerComp)) -> isSimpleExpr ceenv innerComp) @@ -2649,16 +2784,32 @@ and TranslateComputationExpression (ceenv: ComputationExpressionContext<'a>) fir | _ -> SynExpr.YieldOrReturn((false, true), SynExpr.Const(SynConst.Unit, m), m, SynExprYieldOrReturnTrivia.Zero) let letBangBind = - SynExpr.LetOrUseBang( - DebugPointAtBinding.NoneAtDo, - false, - false, - SynPat.Const(SynConst.Unit, mUnit), - rhsExpr, - [], - bodyExpr, - m, - SynExprLetOrUseTrivia.Zero + let binding = + SynBinding( + accessibility = None, + kind = SynBindingKind.Normal, + isInline = false, + isMutable = false, + attributes = [], + xmlDoc = PreXmlDoc.Empty, + valData = SynInfo.emptySynValData, + headPat = SynPat.Const(SynConst.Unit, mUnit), + returnInfo = None, + expr = rhsExpr, + range = rhsExpr.Range, + debugPoint = DebugPointAtBinding.NoneAtDo, + trivia = SynBindingTrivia.Zero + ) + + SynExpr.LetOrUse( + isRecursive = false, + isUse = false, + isFromSource = false, // compiler generated during desugaring + isBang = true, + bindings = [ binding ], + body = bodyExpr, + range = m, + trivia = SynExprLetOrUseTrivia.Zero ) TranslateComputationExpression ceenv CompExprTranslationPass.Initial q varSpace letBangBind translatedCtxt diff --git a/src/Compiler/Checking/Expressions/CheckExpressions.fs b/src/Compiler/Checking/Expressions/CheckExpressions.fs index 1d191d77fd7..a2c1a2d4e92 100644 --- a/src/Compiler/Checking/Expressions/CheckExpressions.fs +++ b/src/Compiler/Checking/Expressions/CheckExpressions.fs @@ -6072,7 +6072,7 @@ and TcExprUndelayed (cenv: cenv) (overallTy: OverallTy) env tpenv (synExpr: SynE | SynExpr.DoBang (trivia = { DoBangKeyword = m }) | SynExpr.MatchBang (trivia = { MatchBangKeyword = m }) | SynExpr.WhileBang (range = m) - | SynExpr.LetOrUseBang (trivia = { LetOrUseKeyword = m }) -> + | SynExpr.LetOrUse (isBang = true; trivia = { LetOrUseKeyword = m }) -> error(Error(FSComp.SR.tcConstructRequiresComputationExpression(), m)) | SynExpr.IndexFromEnd (rightExpr, m) -> @@ -9199,7 +9199,7 @@ and TcImplicitOpItemThen (cenv: cenv) overallTy env id sln tpenv mItem delayed = | SynExpr.YieldOrReturn _ | SynExpr.YieldOrReturnFrom _ | SynExpr.MatchBang _ - | SynExpr.LetOrUseBang _ + | SynExpr.LetOrUse (isBang = true) | SynExpr.DoBang _ | SynExpr.WhileBang _ | SynExpr.TraitCall _ @@ -10614,7 +10614,7 @@ and TcLinearExprs bodyChecker cenv env overallTy tpenv isCompExpr synExpr cont = TcLinearExprs bodyChecker cenv env2 overallTy tpenv isCompExpr expr2 (fun (expr2R, tpenv) -> cont (Expr.Sequential (expr1R, expr2R, NormalSeq, m), tpenv)) - | SynExpr.LetOrUse (isRec, isUse, binds, body, m, _) when not (isUse && isCompExpr) -> + | SynExpr.LetOrUse (isRecursive = isRec; isUse= isUse; bindings = binds; body = body; range = m) when not (isUse && isCompExpr) -> if isRec then // TcLinearExprs processes at most one recursive binding, this is not tailcalling CheckRecursiveBindingIds binds diff --git a/src/Compiler/Checking/Expressions/CheckExpressionsOps.fs b/src/Compiler/Checking/Expressions/CheckExpressionsOps.fs index 7f5ff2f9f64..6c12485c4ed 100644 --- a/src/Compiler/Checking/Expressions/CheckExpressionsOps.fs +++ b/src/Compiler/Checking/Expressions/CheckExpressionsOps.fs @@ -202,9 +202,6 @@ let YieldFree (cenv: TcFileState) expr = | SynExpr.While(doExpr = body) | SynExpr.WhileBang(doExpr = body) | SynExpr.ForEach(bodyExpr = body) -> YieldFree body - - | SynExpr.LetOrUseBang(body = body) -> YieldFree body - | SynExpr.YieldOrReturn(flags = (true, _)) -> false | _ -> true @@ -232,7 +229,7 @@ let YieldFree (cenv: TcFileState) expr = | SynExpr.WhileBang(doExpr = body) | SynExpr.ForEach(bodyExpr = body) -> YieldFree body - | SynExpr.LetOrUseBang _ + | SynExpr.LetOrUse(isBang = true) | SynExpr.YieldOrReturnFrom _ | SynExpr.YieldOrReturn _ | SynExpr.ImplicitZero _ @@ -256,7 +253,6 @@ let inline IsSimpleSemicolonSequenceElement expr cenv acceptDeprecated = | SynExpr.LetOrUse _ | SynExpr.Do _ | SynExpr.MatchBang _ - | SynExpr.LetOrUseBang _ | SynExpr.While _ | SynExpr.WhileBang _ -> false | _ -> true diff --git a/src/Compiler/Checking/Expressions/CheckSequenceExpressions.fs b/src/Compiler/Checking/Expressions/CheckSequenceExpressions.fs index 499ed2ca914..c7eed9034b6 100644 --- a/src/Compiler/Checking/Expressions/CheckSequenceExpressions.fs +++ b/src/Compiler/Checking/Expressions/CheckSequenceExpressions.fs @@ -263,7 +263,7 @@ let TcSequenceExpression (cenv: TcFileState) env tpenv comp (overallTy: OverallT // The 'mBind' is attached to the lambda Some(mkSeqUsing cenv env wholeExprMark bindPatTy genOuterTy inputExpr consumeExpr, tpenv) - | SynExpr.LetOrUseBang(range = m) -> error (Error(FSComp.SR.tcUseForInSequenceExpression (), m)) + | SynExpr.LetOrUse(isBang = true; range = m) -> error (Error(FSComp.SR.tcUseForInSequenceExpression (), m)) | SynExpr.Match(spMatch, expr, clauses, _m, _trivia) -> let inputExpr, inputTy, tpenv = TcExprOfUnknownType cenv env tpenv expr diff --git a/src/Compiler/Driver/GraphChecking/FileContentMapping.fs b/src/Compiler/Driver/GraphChecking/FileContentMapping.fs index bfcc2600ec0..97fd2e3d987 100644 --- a/src/Compiler/Driver/GraphChecking/FileContentMapping.fs +++ b/src/Compiler/Driver/GraphChecking/FileContentMapping.fs @@ -505,21 +505,6 @@ let visitSynExpr (e: SynExpr) : FileContentEntry list = Continuation.concatenate continuations continuation | SynExpr.YieldOrReturn(expr = expr) -> visit expr continuation | SynExpr.YieldOrReturnFrom(expr = expr) -> visit expr continuation - | SynExpr.LetOrUseBang(pat = pat; rhs = rhs; andBangs = andBangs; body = body) -> - let continuations = - let andBangExprs = List.map (fun (SynBinding(expr = body)) -> body) andBangs - List.map visit (body :: rhs :: andBangExprs) - - let finalContinuation nodes = - [ - yield! List.concat nodes - yield! visitPat pat - for SynBinding(headPat = pat) in andBangs do - yield! visitPat pat - ] - |> continuation - - Continuation.sequence continuations finalContinuation | SynExpr.MatchBang(expr = expr; clauses = clauses) -> visit expr (fun exprNodes -> [ yield! exprNodes; yield! List.collect visitSynMatchClause clauses ] diff --git a/src/Compiler/Service/FSharpParseFileResults.fs b/src/Compiler/Service/FSharpParseFileResults.fs index d9f2df83d30..f5c1d978447 100644 --- a/src/Compiler/Service/FSharpParseFileResults.fs +++ b/src/Compiler/Service/FSharpParseFileResults.fs @@ -762,15 +762,6 @@ type FSharpParseFileResults(diagnostics: FSharpDiagnostic[], input: ParsedInput, yield! walkExpr false e2 yield! walkExpr false e3 - | SynExpr.LetOrUseBang(spBind, _, _, _, rhsExpr, andBangs, bodyExpr, _, _) -> - yield! walkBindSeqPt spBind - yield! walkExpr true rhsExpr - - for SynBinding(debugPoint = andBangSpBind; expr = eAndBang) in andBangs do - yield! walkBindSeqPt andBangSpBind - yield! walkExpr true eAndBang - - yield! walkExpr true bodyExpr ] // Process a class declaration or F# type declaration diff --git a/src/Compiler/Service/ServiceInterfaceStubGenerator.fs b/src/Compiler/Service/ServiceInterfaceStubGenerator.fs index fa13224a927..b6325670b31 100644 --- a/src/Compiler/Service/ServiceInterfaceStubGenerator.fs +++ b/src/Compiler/Service/ServiceInterfaceStubGenerator.fs @@ -956,15 +956,6 @@ module InterfaceStubGenerator = | SynExpr.YieldOrReturnFrom(expr = synExpr) | SynExpr.DoBang(expr = synExpr) -> walkExpr synExpr - | SynExpr.LetOrUseBang(rhs = synExpr1; andBangs = synExprAndBangs; body = synExpr2) -> - [ - yield synExpr1 - for SynBinding(expr = eAndBang) in synExprAndBangs do - yield eAndBang - yield synExpr2 - ] - |> List.tryPick walkExpr - | SynExpr.LibraryOnlyILAssembly _ | SynExpr.LibraryOnlyStaticOptimization _ | SynExpr.LibraryOnlyUnionCaseFieldGet _ diff --git a/src/Compiler/Service/ServiceParseTreeWalk.fs b/src/Compiler/Service/ServiceParseTreeWalk.fs index ce689f8f5d6..da7f1aaadc2 100644 --- a/src/Compiler/Service/ServiceParseTreeWalk.fs +++ b/src/Compiler/Service/ServiceParseTreeWalk.fs @@ -745,20 +745,6 @@ module SyntaxTraversal = ] |> pick expr - | SynExpr.LetOrUseBang(pat = synPat; rhs = synExpr; andBangs = andBangSynExprs; body = synExpr2) -> - [ - yield dive synPat synPat.Range traversePat - yield dive synExpr synExpr.Range traverseSynExpr - yield! - [ - for SynBinding(headPat = andBangSynPat; expr = andBangSynExpr) in andBangSynExprs do - yield (dive andBangSynPat andBangSynPat.Range traversePat) - yield (dive andBangSynExpr andBangSynExpr.Range traverseSynExpr) - ] - yield dive synExpr2 synExpr2.Range traverseSynExpr - ] - |> pick expr - | SynExpr.Dynamic _ | SynExpr.Ident _ | SynExpr.LongIdent _ diff --git a/src/Compiler/Service/ServiceParsedInputOps.fs b/src/Compiler/Service/ServiceParsedInputOps.fs index 585d29787fc..4b5e3cf9028 100644 --- a/src/Compiler/Service/ServiceParsedInputOps.fs +++ b/src/Compiler/Service/ServiceParsedInputOps.fs @@ -848,15 +848,6 @@ module ParsedInput = | SynExpr.Ident ident -> ifPosInRange ident.idRange (fun _ -> Some(EntityKind.FunctionOrValue false)) - | SynExpr.LetOrUseBang(rhs = e1; andBangs = es; body = e2) -> - [ - yield e1 - for SynBinding(expr = eAndBang) in es do - yield eAndBang - yield e2 - ] - |> List.tryPick (walkExprWithKind parentKind) - | SynExpr.TraitCall(TypesForTypar ts, sign, e, _) -> List.tryPick walkType ts |> Option.orElseWith (fun () -> walkMemberSig sign) @@ -2155,16 +2146,6 @@ module ParsedInput = walkExpr e2 walkExpr e3 - | SynExpr.LetOrUseBang(pat = pat; rhs = e1; andBangs = es; body = e2) -> - walkPat pat - walkExpr e1 - - for SynBinding(headPat = patAndBang; expr = eAndBang) in es do - walkPat patAndBang - walkExpr eAndBang - - walkExpr e2 - | SynExpr.TraitCall(TypesForTypar ts, sign, e, _) -> List.iter walkType ts walkMemberSig sign diff --git a/src/Compiler/Service/ServiceStructure.fs b/src/Compiler/Service/ServiceStructure.fs index 8025a7f1b0d..bcf0d8d2bc8 100644 --- a/src/Compiler/Service/ServiceStructure.fs +++ b/src/Compiler/Service/ServiceStructure.fs @@ -258,25 +258,6 @@ module Structure = rcheck Scope.Do Collapse.Below r <| Range.modStart 3 r parseExpr e - | SynExpr.LetOrUseBang(pat = pat; rhs = eLet; andBangs = es; body = eBody) -> - let exprs = - [ - eLet - for SynBinding(expr = eAndBang) in es do - eAndBang - ] - - for e in exprs do - // for `let!`, `use!` or `and!` the pattern begins at the end of the - // keyword so that this scope can be used without adjustment if there is no `=` - // on the same line. If there is an `=` the range will be adjusted during the - // tooltip creation - let r = Range.endToEnd pat.Range e.Range - rcheck Scope.LetOrUseBang Collapse.Below r r - parseExpr e - - parseExpr eBody - | SynExpr.For(doBody = e; range = r) | SynExpr.ForEach(_, _, _, _, _, _, e, r) -> rcheck Scope.For Collapse.Below r r diff --git a/src/Compiler/Service/SynExpr.fs b/src/Compiler/Service/SynExpr.fs index 52c10e8a7a5..9fd1b3a888a 100644 --- a/src/Compiler/Service/SynExpr.fs +++ b/src/Compiler/Service/SynExpr.fs @@ -444,8 +444,7 @@ module SynExpr = [] let (|LetOrUse|_|) = dangling (function - | SynExpr.LetOrUse _ - | SynExpr.LetOrUseBang _ as expr -> Some expr + | SynExpr.LetOrUse _ as expr -> Some expr | _ -> None) /// Matches a dangling sequential expression. @@ -697,7 +696,6 @@ module SynExpr = | _, SyntaxNode.SynExpr(SynExpr.Lazy _ as outer) :: _ | _, SyntaxNode.SynExpr(SynExpr.App(argExpr = SynExpr.Paren(expr = Is expr)) as outer) :: _ | _, SyntaxNode.SynExpr(SynExpr.LetOrUse _ as outer) :: _ - | _, SyntaxNode.SynExpr(SynExpr.LetOrUseBang _ as outer) :: _ | _, SyntaxNode.SynExpr(SynExpr.TryWith _ as outer) :: _ | _, SyntaxNode.SynExpr(SynExpr.TryFinally _ as outer) :: _ | _, SyntaxNode.SynExpr(SynExpr.For _ as outer) :: _ @@ -1211,7 +1209,6 @@ module SynExpr = | SynExpr.Match _, _ | SynExpr.MatchBang _, _ | SynExpr.LetOrUse _, _ - | SynExpr.LetOrUseBang _, _ | SynExpr.Sequential _, _ | SynExpr.Do _, _ | SynExpr.DoBang _, _ diff --git a/src/Compiler/Service/SynPat.fs b/src/Compiler/Service/SynPat.fs index c94448ce318..459f1586da4 100644 --- a/src/Compiler/Service/SynPat.fs +++ b/src/Compiler/Service/SynPat.fs @@ -92,11 +92,17 @@ module SynPat = // set (x: …, y: …) = … | SynPat.Typed _, SyntaxNode.SynPat(Rightmost(SynPat.Paren(Is pat, _))) :: SyntaxNode.SynMatchClause _ :: _ | Rightmost(SynPat.Typed _), SyntaxNode.SynMatchClause _ :: _ - | SynPat.Typed _, SyntaxNode.SynExpr(SynExpr.LetOrUseBang _) :: _ - | SynPat.Typed _, SyntaxNode.SynPat(SynPat.Tuple(isStruct = false)) :: SyntaxNode.SynExpr(SynExpr.LetOrUseBang _) :: _ - | SynPat.Tuple(isStruct = false; elementPats = AnyTyped), SyntaxNode.SynExpr(SynExpr.LetOrUseBang _) :: _ + | SynPat.Typed _, SyntaxNode.SynExpr(SynExpr.LetOrUse(isBang = true)) :: _ + | SynPat.Typed _, SyntaxNode.SynPat(SynPat.Tuple(isStruct = false)) :: SyntaxNode.SynExpr(SynExpr.LetOrUse(isBang = true)) :: _ + | SynPat.Tuple(isStruct = false; elementPats = AnyTyped), SyntaxNode.SynExpr(SynExpr.LetOrUse(isBang = true)) :: _ | SynPat.Typed _, SyntaxNode.SynPat(SynPat.Tuple(isStruct = false)) :: SyntaxNode.SynBinding _ :: _ | SynPat.Tuple(isStruct = false; elementPats = AnyTyped), SyntaxNode.SynBinding _ :: _ + + // let! (_ : obj) = … + | SynPat.Typed _, SyntaxNode.SynBinding _ :: SyntaxNode.SynExpr(SynExpr.LetOrUse(isBang = true)) :: _ -> true + + // let! (A _) = … + | SynPat.LongIdent _, SyntaxNode.SynBinding _ :: SyntaxNode.SynExpr(SynExpr.LetOrUse(isBang = true)) :: _ -> false | SynPat.LongIdent(argPats = SynArgPats.Pats(_ :: _)), SyntaxNode.SynBinding _ :: _ | SynPat.LongIdent(argPats = SynArgPats.Pats(_ :: _)), SyntaxNode.SynExpr(SynExpr.Lambda _) :: _ | SynPat.Tuple(isStruct = false), SyntaxNode.SynExpr(SynExpr.Lambda(parsedData = Some _)) :: _ @@ -144,7 +150,6 @@ module SynPat = | SyntaxNode.SynExpr(SynExpr.Lambda(body = rhs)) :: _ | SyntaxNode.SynExpr(SynExpr.LetOrUse(body = rhs)) :: _ - | SyntaxNode.SynExpr(SynExpr.LetOrUseBang(body = rhs)) :: _ | SyntaxNode.SynBinding(SynBinding(expr = rhs)) :: _ | SyntaxNode.SynMatchClause(SynMatchClause(resultExpr = rhs)) :: _ -> let rhsRange = rhs.Range @@ -243,7 +248,7 @@ module SynPat = // fun (x) -> … | _, SyntaxNode.SynBinding _ :: _ | _, SyntaxNode.SynExpr(SynExpr.ForEach _) :: _ - | _, SyntaxNode.SynExpr(SynExpr.LetOrUseBang _) :: _ + | _, SyntaxNode.SynExpr(SynExpr.LetOrUse(isBang = true)) :: _ | _, SyntaxNode.SynMatchClause _ :: _ | Atomic, SyntaxNode.SynExpr(SynExpr.Lambda(parsedData = Some _)) :: _ -> false diff --git a/src/Compiler/SyntaxTree/ParseHelpers.fs b/src/Compiler/SyntaxTree/ParseHelpers.fs index 35b8a3d46db..4db7221c787 100644 --- a/src/Compiler/SyntaxTree/ParseHelpers.fs +++ b/src/Compiler/SyntaxTree/ParseHelpers.fs @@ -1066,46 +1066,79 @@ let leadingKeywordIsAbstract = | _ -> false /// Unified helper for creating let/let!/use/use! expressions -/// Creates either SynExpr.LetOrUse or SynExpr.LetOrUseBang based on isBang parameter +/// Creates SynExpr.LetOrUse based on isBang parameter /// Handles all four cases: 'let', 'let!', 'use', and 'use!' let mkLetExpression ( isBang: bool, - mKeyword: range, - mIn: Option, + mIn: range option, mWhole: range, body: SynExpr, - bindingInfo: (bool * BindingSet) option, - bangInfo: (SynPat * SynExpr * SynBinding list * range option * bool) option + bindingInfo: BindingSet option, + bangInfo: (SynPat * SynExpr * SynBinding list * range * range option * bool) option ) = if isBang then match bangInfo with - | Some(pat, rhs, andBangs, mEquals, isUse) -> - // Create let! or use! expression + | Some(pat, rhs, andBangs, mKeyword, mEquals, isUse) -> let spBind = DebugPointAtBinding.Yes(unionRanges mKeyword rhs.Range) - let trivia: SynExprLetOrUseTrivia = + let trivia: SynBindingTrivia = { - LetOrUseKeyword = mKeyword - InKeyword = mIn + LeadingKeyword = + if isUse then + SynLeadingKeyword.Use mKeyword + else + SynLeadingKeyword.Let mKeyword + InlineKeyword = mIn EqualsRange = mEquals } - // isFromSource is true for user-written code - SynExpr.LetOrUseBang(spBind, isUse, true, pat, rhs, andBangs, body, mWhole, trivia) + + let binding = + SynBinding( + accessibility = None, + kind = SynBindingKind.Normal, + isInline = false, + isMutable = false, + attributes = [], + xmlDoc = PreXmlDoc.Empty, + valData = SynInfo.emptySynValData, + headPat = pat, + returnInfo = None, + expr = rhs, + range = mWhole, + debugPoint = spBind, + trivia = trivia + ) + + SynExpr.LetOrUse( + isRecursive = false, + isUse = isUse, + isFromSource = true, + isBang = true, + bindings = binding :: andBangs, + body = body, + range = mWhole, + trivia = + { + LetOrUseKeyword = mKeyword + InKeyword = mIn + EqualsRange = mEquals + } + ) + | None -> SynExpr.FromParseError(body, mWhole) else match bindingInfo with - | Some(isRec, BindingSetPreAttrs(_, _, isUse, declsPreAttrs, _)) -> - // Create regular let or use expression + | Some(BindingSetPreAttrs(_, isRec, isUse, declsPreAttrs, _)) -> let ignoredFreeAttrs, decls = declsPreAttrs [] None - let mWhole' = + let mWhole = match decls with | SynBinding(xmlDoc = xmlDoc) :: _ -> unionRangeWithXmlDoc xmlDoc mWhole | _ -> mWhole if not (isNil ignoredFreeAttrs) then - warning (Error(FSComp.SR.parsAttributesIgnored (), mWhole')) + warning (Error(FSComp.SR.parsAttributesIgnored (), mWhole)) let mIn' = mIn @@ -1126,15 +1159,18 @@ let mkLetExpression | _ -> None SynExpr.LetOrUse( - isRec, - isUse, // Pass through the isUse flag from binding info - decls, - body, - mWhole', - { - LetOrUseKeyword = mLetOrUse - InKeyword = mIn' - EqualsRange = mEquals - } + isRecursive = isRec, + isUse = isUse, + isFromSource = true, + isBang = false, + bindings = decls, + body = body, + range = mWhole, + trivia = + { + LetOrUseKeyword = mLetOrUse + InKeyword = mIn' + EqualsRange = mEquals + } ) | None -> SynExpr.FromParseError(body, mWhole) diff --git a/src/Compiler/SyntaxTree/ParseHelpers.fsi b/src/Compiler/SyntaxTree/ParseHelpers.fsi index 03e9e37f274..f1b91b1f64f 100644 --- a/src/Compiler/SyntaxTree/ParseHelpers.fsi +++ b/src/Compiler/SyntaxTree/ParseHelpers.fsi @@ -196,16 +196,15 @@ val mkClassMemberLocalBindings: isStatic: bool * initialRangeOpt: range option * attrs: SynAttributes * vis: SynAccess option * BindingSet -> SynMemberDefn -/// Creates either SynExpr.LetOrUse or SynExpr.LetOrUseBang based on isBang parameter +/// Creates SynExpr.LetOrUse based on isBang parameter /// Handles all four cases: 'let', 'let!', 'use', and 'use!' val mkLetExpression: isBang: bool * - mKeyword: range * mIn: range option * mWhole: range * body: SynExpr * - bindingInfo: (bool * BindingSet) option * - bangInfo: (SynPat * SynExpr * SynBinding list * range option * bool) option -> + bindingInfo: BindingSet option * + bangInfo: (SynPat * SynExpr * SynBinding list * range * range option * bool) option -> SynExpr val mkAndBang: diff --git a/src/Compiler/SyntaxTree/SyntaxTree.fs b/src/Compiler/SyntaxTree/SyntaxTree.fs index de74d343f7b..ca71014c79c 100644 --- a/src/Compiler/SyntaxTree/SyntaxTree.fs +++ b/src/Compiler/SyntaxTree/SyntaxTree.fs @@ -718,15 +718,12 @@ type SynExpr = | YieldOrReturnFrom of flags: (bool * bool) * expr: SynExpr * range: range * trivia: SynExprYieldOrReturnFromTrivia - | LetOrUse of isRecursive: bool * isUse: bool * bindings: SynBinding list * body: SynExpr * range: range * trivia: SynExprLetOrUseTrivia - - | LetOrUseBang of - bindDebugPoint: DebugPointAtBinding * + | LetOrUse of + isRecursive: bool * isUse: bool * isFromSource: bool * - pat: SynPat * - rhs: SynExpr * - andBangs: SynBinding list * + isBang: bool * + bindings: SynBinding list * body: SynExpr * range: range * trivia: SynExprLetOrUseTrivia @@ -835,7 +832,6 @@ type SynExpr = | SynExpr.ImplicitZero(range = m) | SynExpr.YieldOrReturn(range = m) | SynExpr.YieldOrReturnFrom(range = m) - | SynExpr.LetOrUseBang(range = m) | SynExpr.MatchBang(range = m) | SynExpr.DoBang(range = m) | SynExpr.WhileBang(range = m) diff --git a/src/Compiler/SyntaxTree/SyntaxTree.fsi b/src/Compiler/SyntaxTree/SyntaxTree.fsi index d6a01186807..131c8f6f056 100644 --- a/src/Compiler/SyntaxTree/SyntaxTree.fsi +++ b/src/Compiler/SyntaxTree/SyntaxTree.fsi @@ -878,25 +878,19 @@ type SynExpr = /// F# syntax: let f pat1 .. patN = expr in expr /// F# syntax: let rec f pat1 .. patN = expr in expr /// F# syntax: use pat = expr in expr - | LetOrUse of - isRecursive: bool * - isUse: bool * - bindings: SynBinding list * - body: SynExpr * - range: range * - trivia: SynExprLetOrUseTrivia - /// F# syntax: let! pat = expr in expr /// F# syntax: use! pat = expr in expr /// F# syntax: let! pat = expr and! ... and! ... and! pat = expr in expr - /// Computation expressions only - | LetOrUseBang of - bindDebugPoint: DebugPointAtBinding * + | LetOrUse of + // isRecursive: true for 'let rec' and 'use rec' bindings, false for 'let' and 'use' bindings + isRecursive: bool * + /// isUse: true for 'use' and 'use!' bindings, false for 'let' and 'let!' isUse: bool * + // isFromSource: flag indicates whether a binding was explicitly written by the user in the source code versus generated by the compiler during transformations. isFromSource: bool * - pat: SynPat * - rhs: SynExpr * - andBangs: SynBinding list * + // isBang: true for 'let!' and 'use!' bindings, false for 'let' and 'use' bindings + isBang: bool * + bindings: SynBinding list * body: SynExpr * range: range * trivia: SynExprLetOrUseTrivia diff --git a/src/Compiler/SyntaxTree/SyntaxTreeOps.fs b/src/Compiler/SyntaxTree/SyntaxTreeOps.fs index 349c8e8002c..020dc50bebf 100644 --- a/src/Compiler/SyntaxTree/SyntaxTreeOps.fs +++ b/src/Compiler/SyntaxTree/SyntaxTreeOps.fs @@ -209,7 +209,6 @@ let rec IsControlFlowExpression e = // Treat "ident { ... }" as a control flow expression | SynExpr.App(_, _, SynExpr.Ident _, SynExpr.ComputationExpr _, _) | SynExpr.IfThenElse _ - | SynExpr.LetOrUseBang _ | SynExpr.Match _ | SynExpr.TryWith _ | SynExpr.TryFinally _ @@ -981,15 +980,6 @@ let rec synExprContainsError inpExpr = | SynExpr.DotNamedIndexedPropertySet(e1, _, e2, e3, _) -> walkExpr e1 || walkExpr e2 || walkExpr e3 - | SynExpr.LetOrUseBang(rhs = e1; body = e2; andBangs = es) -> - walkExpr e1 - || walkExprs - [ - for SynBinding(expr = e) in es do - yield e - ] - || walkExpr e2 - | SynExpr.InterpolatedString(parts, _, _m) -> parts |> List.choose (function diff --git a/src/Compiler/pars.fsy b/src/Compiler/pars.fsy index 8b0dfa4ae8c..a8225213eb6 100644 --- a/src/Compiler/pars.fsy +++ b/src/Compiler/pars.fsy @@ -4112,8 +4112,7 @@ sequentialExpr: let usedKeyword = if isUse then "use" else "let" reportParseErrorAt mLetKwd (FSComp.SR.parsExpectedExpressionAfterLet(usedKeyword, usedKeyword)) let fauxRange = m.EndRange // zero width range at end of m - let isRec = match bindingSet with BindingSetPreAttrs(_, isRec, _, _, _) -> isRec - mkLetExpression(false, mLetKwd, mIn, m, arbExpr ("seqExpr", fauxRange), Some(isRec, bindingSet), None) } + mkLetExpression(false, mIn, m, arbExpr ("seqExpr", fauxRange), Some bindingSet, None) } /* Use this as the last terminal when performing error recovery */ /* The contract for using this is that (a) if EOF occurs then the */ @@ -4165,15 +4164,13 @@ declExpr: { let mIn = rhs parseState 2 |> Some let mWhole = unionRanges (rhs2 parseState 1 2) $3.Range let bindingSet = $1 - let mKeyword, isRec = match bindingSet with BindingSetPreAttrs(m, isRec, _, _, _) -> m, isRec - mkLetExpression(false, mKeyword, mIn, mWhole, $3, Some(isRec, bindingSet), None) } + mkLetExpression(false, mIn, mWhole, $3, Some bindingSet, None) } | defnBindings IN error %prec expr_let { let mIn = rhs parseState 2 |> Some let mWhole = rhs2 parseState 1 2 let bindingSet = $1 - let mKeyword, isRec = match bindingSet with BindingSetPreAttrs(m, isRec, _, _, _) -> m, isRec - mkLetExpression(false, mKeyword, mIn, mWhole, arbExpr ("declExpr1", (rhs parseState 3)), Some(isRec, bindingSet), None) } + mkLetExpression(false, mIn, mWhole, arbExpr ("declExpr1", (rhs parseState 3)), Some bindingSet, None) } /* FSComp.SR.parsNoMatchingInForLet() -- leave this in for now - it's an unused error string */ @@ -4181,27 +4178,23 @@ declExpr: | hardwhiteLetBindings typedSequentialExprBlock %prec expr_let { let bindingSet, m, mIn = $1 let mWhole = unionRanges m $2.Range - let mKeyword, isRec = match bindingSet with BindingSetPreAttrs(m, isRec, _, _, _) -> m, isRec - mkLetExpression(false, mKeyword, mIn, mWhole, $2, Some(isRec, bindingSet), None) } + mkLetExpression(false, mIn, mWhole, $2, Some bindingSet, None) } | hardwhiteLetBindings error %prec expr_let { let bindingSet, m, mIn = $1 reportParseErrorAt (match bindingSet with (BindingSetPreAttrs(m, _, _, _, _)) -> m) (FSComp.SR.parsErrorInReturnForLetIncorrectIndentation()) - let mKeyword, isRec = match bindingSet with BindingSetPreAttrs(m, isRec, _, _, _) -> m, isRec - mkLetExpression(false, mKeyword, mIn, m, arbExpr ("declExpr2", (rhs parseState 2)), Some(isRec, bindingSet), None) } + mkLetExpression(false, mIn, m, arbExpr ("declExpr2", (rhs parseState 2)), Some bindingSet, None) } | hardwhiteLetBindings OBLOCKSEP typedSequentialExprBlock %prec expr_let { let bindingSet, m, mIn = $1 let mWhole = unionRanges m $3.Range - let mKeyword, isRec = match bindingSet with BindingSetPreAttrs(m, isRec, _, _, _) -> m, isRec - mkLetExpression(false, mKeyword, mIn, mWhole, $3, Some(isRec, bindingSet), None) } + mkLetExpression(false, mIn, mWhole, $3, Some bindingSet, None) } | hardwhiteLetBindings OBLOCKSEP error %prec expr_let { let bindingSet, m, mIn = $1 //reportParseErrorAt (match bindingSet with (BindingSetPreAttrs(m, _, _, _, _)) -> m) (FSComp.SR.parsErrorInReturnForLetIncorrectIndentation()) let mWhole = unionRanges m (rhs parseState 3) - let mKeyword, isRec = match bindingSet with BindingSetPreAttrs(m, isRec, _, _, _) -> m, isRec - mkLetExpression(false, mKeyword, mIn, mWhole, arbExpr ("declExpr3", (rhs parseState 3)), Some(isRec, bindingSet), None) } + mkLetExpression(false, mIn, mWhole, arbExpr ("declExpr3", (rhs parseState 3)), Some bindingSet, None) } | hardwhiteDoBinding %prec expr_let { let (BindingSetPreAttrs(_, _, _, _, m)), e = $1 @@ -4539,7 +4532,7 @@ declExpr: // $1 contains the actual keyword ("let" or "use") let isUse = ($1 = "use") - mkLetExpression(true, mKeyword, None, m, $8, None, Some(pat, $4, $7, mEquals, isUse)) } + mkLetExpression(true, None, m, $8, None, Some(pat, $4, $7, mKeyword, mEquals, isUse)) } | OBINDER ceBindingCore EQUALS typedSequentialExprBlock hardwhiteDefnBindingsTerminator opt_OBLOCKSEP moreBinders typedSequentialExprBlock %prec expr_let { // Offside-sensitive version of let!/use! binding @@ -4557,7 +4550,7 @@ declExpr: let isUse = ($1 = "use") - mkLetExpression(true, mKeyword, None, m, $8, None, Some(pat, $4, $7, mEquals, isUse)) } + mkLetExpression(true, None, m, $8, None, Some(pat, $4, $7, mKeyword, mEquals, isUse)) } | OBINDER ceBindingCore EQUALS typedSequentialExprBlock hardwhiteDefnBindingsTerminator opt_OBLOCKSEP error %prec expr_let { // Error recovery for incomplete let!/use! bindings @@ -4576,7 +4569,7 @@ declExpr: let isUse = ($1 = "use") // Use ImplicitZero as the continuation expression for error recovery - mkLetExpression(true, mKeyword, None, mAll, SynExpr.ImplicitZero m, None, Some(pat, $4, [], mEquals, isUse)) } + mkLetExpression(true, None, mAll, SynExpr.ImplicitZero m, None, Some(pat, $4, [], mKeyword, mEquals, isUse)) } | DO_BANG typedSequentialExpr IN opt_OBLOCKSEP typedSequentialExprBlock %prec expr_let { let spBind = DebugPointAtBinding.NoneAtDo diff --git a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.debug.bsl b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.debug.bsl index 79894ad0ccc..32cad895835 100644 --- a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.debug.bsl +++ b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.debug.bsl @@ -7207,8 +7207,12 @@ FSharp.Compiler.Syntax.SynExpr+Lazy: FSharp.Compiler.Syntax.SynExpr expr FSharp.Compiler.Syntax.SynExpr+Lazy: FSharp.Compiler.Syntax.SynExpr get_expr() FSharp.Compiler.Syntax.SynExpr+Lazy: FSharp.Compiler.Text.Range get_range() FSharp.Compiler.Syntax.SynExpr+Lazy: FSharp.Compiler.Text.Range range +FSharp.Compiler.Syntax.SynExpr+LetOrUse: Boolean get_isBang() +FSharp.Compiler.Syntax.SynExpr+LetOrUse: Boolean get_isFromSource() FSharp.Compiler.Syntax.SynExpr+LetOrUse: Boolean get_isRecursive() FSharp.Compiler.Syntax.SynExpr+LetOrUse: Boolean get_isUse() +FSharp.Compiler.Syntax.SynExpr+LetOrUse: Boolean isBang +FSharp.Compiler.Syntax.SynExpr+LetOrUse: Boolean isFromSource FSharp.Compiler.Syntax.SynExpr+LetOrUse: Boolean isRecursive FSharp.Compiler.Syntax.SynExpr+LetOrUse: Boolean isUse FSharp.Compiler.Syntax.SynExpr+LetOrUse: FSharp.Compiler.Syntax.SynExpr body @@ -7219,24 +7223,6 @@ FSharp.Compiler.Syntax.SynExpr+LetOrUse: FSharp.Compiler.Text.Range get_range() FSharp.Compiler.Syntax.SynExpr+LetOrUse: FSharp.Compiler.Text.Range range FSharp.Compiler.Syntax.SynExpr+LetOrUse: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynBinding] bindings FSharp.Compiler.Syntax.SynExpr+LetOrUse: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynBinding] get_bindings() -FSharp.Compiler.Syntax.SynExpr+LetOrUseBang: Boolean get_isFromSource() -FSharp.Compiler.Syntax.SynExpr+LetOrUseBang: Boolean get_isUse() -FSharp.Compiler.Syntax.SynExpr+LetOrUseBang: Boolean isFromSource -FSharp.Compiler.Syntax.SynExpr+LetOrUseBang: Boolean isUse -FSharp.Compiler.Syntax.SynExpr+LetOrUseBang: FSharp.Compiler.Syntax.DebugPointAtBinding bindDebugPoint -FSharp.Compiler.Syntax.SynExpr+LetOrUseBang: FSharp.Compiler.Syntax.DebugPointAtBinding get_bindDebugPoint() -FSharp.Compiler.Syntax.SynExpr+LetOrUseBang: FSharp.Compiler.Syntax.SynExpr body -FSharp.Compiler.Syntax.SynExpr+LetOrUseBang: FSharp.Compiler.Syntax.SynExpr get_body() -FSharp.Compiler.Syntax.SynExpr+LetOrUseBang: FSharp.Compiler.Syntax.SynExpr get_rhs() -FSharp.Compiler.Syntax.SynExpr+LetOrUseBang: FSharp.Compiler.Syntax.SynExpr rhs -FSharp.Compiler.Syntax.SynExpr+LetOrUseBang: FSharp.Compiler.Syntax.SynPat get_pat() -FSharp.Compiler.Syntax.SynExpr+LetOrUseBang: FSharp.Compiler.Syntax.SynPat pat -FSharp.Compiler.Syntax.SynExpr+LetOrUseBang: FSharp.Compiler.SyntaxTrivia.SynExprLetOrUseTrivia get_trivia() -FSharp.Compiler.Syntax.SynExpr+LetOrUseBang: FSharp.Compiler.SyntaxTrivia.SynExprLetOrUseTrivia trivia -FSharp.Compiler.Syntax.SynExpr+LetOrUseBang: FSharp.Compiler.Text.Range get_range() -FSharp.Compiler.Syntax.SynExpr+LetOrUseBang: FSharp.Compiler.Text.Range range -FSharp.Compiler.Syntax.SynExpr+LetOrUseBang: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynBinding] andBangs -FSharp.Compiler.Syntax.SynExpr+LetOrUseBang: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynBinding] get_andBangs() FSharp.Compiler.Syntax.SynExpr+LibraryOnlyILAssembly: FSharp.Compiler.Text.Range get_range() FSharp.Compiler.Syntax.SynExpr+LibraryOnlyILAssembly: FSharp.Compiler.Text.Range range FSharp.Compiler.Syntax.SynExpr+LibraryOnlyILAssembly: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynExpr] args @@ -7442,7 +7428,6 @@ FSharp.Compiler.Syntax.SynExpr+Tags: Int32 JoinIn FSharp.Compiler.Syntax.SynExpr+Tags: Int32 Lambda FSharp.Compiler.Syntax.SynExpr+Tags: Int32 Lazy FSharp.Compiler.Syntax.SynExpr+Tags: Int32 LetOrUse -FSharp.Compiler.Syntax.SynExpr+Tags: Int32 LetOrUseBang FSharp.Compiler.Syntax.SynExpr+Tags: Int32 LibraryOnlyILAssembly FSharp.Compiler.Syntax.SynExpr+Tags: Int32 LibraryOnlyStaticOptimization FSharp.Compiler.Syntax.SynExpr+Tags: Int32 LibraryOnlyUnionCaseFieldGet @@ -7621,7 +7606,6 @@ FSharp.Compiler.Syntax.SynExpr: Boolean IsJoinIn FSharp.Compiler.Syntax.SynExpr: Boolean IsLambda FSharp.Compiler.Syntax.SynExpr: Boolean IsLazy FSharp.Compiler.Syntax.SynExpr: Boolean IsLetOrUse -FSharp.Compiler.Syntax.SynExpr: Boolean IsLetOrUseBang FSharp.Compiler.Syntax.SynExpr: Boolean IsLibraryOnlyILAssembly FSharp.Compiler.Syntax.SynExpr: Boolean IsLibraryOnlyStaticOptimization FSharp.Compiler.Syntax.SynExpr: Boolean IsLibraryOnlyUnionCaseFieldGet @@ -7692,7 +7676,6 @@ FSharp.Compiler.Syntax.SynExpr: Boolean get_IsJoinIn() FSharp.Compiler.Syntax.SynExpr: Boolean get_IsLambda() FSharp.Compiler.Syntax.SynExpr: Boolean get_IsLazy() FSharp.Compiler.Syntax.SynExpr: Boolean get_IsLetOrUse() -FSharp.Compiler.Syntax.SynExpr: Boolean get_IsLetOrUseBang() FSharp.Compiler.Syntax.SynExpr: Boolean get_IsLibraryOnlyILAssembly() FSharp.Compiler.Syntax.SynExpr: Boolean get_IsLibraryOnlyStaticOptimization() FSharp.Compiler.Syntax.SynExpr: Boolean get_IsLibraryOnlyUnionCaseFieldGet() @@ -7761,8 +7744,7 @@ FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewInterpolatedSt FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewJoinIn(FSharp.Compiler.Syntax.SynExpr, FSharp.Compiler.Text.Range, FSharp.Compiler.Syntax.SynExpr, FSharp.Compiler.Text.Range) FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewLambda(Boolean, Boolean, FSharp.Compiler.Syntax.SynSimplePats, FSharp.Compiler.Syntax.SynExpr, Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynPat],FSharp.Compiler.Syntax.SynExpr]], FSharp.Compiler.Text.Range, FSharp.Compiler.SyntaxTrivia.SynExprLambdaTrivia) FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewLazy(FSharp.Compiler.Syntax.SynExpr, FSharp.Compiler.Text.Range) -FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewLetOrUse(Boolean, Boolean, Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynBinding], FSharp.Compiler.Syntax.SynExpr, FSharp.Compiler.Text.Range, FSharp.Compiler.SyntaxTrivia.SynExprLetOrUseTrivia) -FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewLetOrUseBang(FSharp.Compiler.Syntax.DebugPointAtBinding, Boolean, Boolean, FSharp.Compiler.Syntax.SynPat, FSharp.Compiler.Syntax.SynExpr, Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynBinding], FSharp.Compiler.Syntax.SynExpr, FSharp.Compiler.Text.Range, FSharp.Compiler.SyntaxTrivia.SynExprLetOrUseTrivia) +FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewLetOrUse(Boolean, Boolean, Boolean, Boolean, Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynBinding], FSharp.Compiler.Syntax.SynExpr, FSharp.Compiler.Text.Range, FSharp.Compiler.SyntaxTrivia.SynExprLetOrUseTrivia) FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewLibraryOnlyILAssembly(System.Object, Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynType], Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynExpr], Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynType], FSharp.Compiler.Text.Range) FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewLibraryOnlyStaticOptimization(Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynStaticOptimizationConstraint], FSharp.Compiler.Syntax.SynExpr, FSharp.Compiler.Syntax.SynExpr, FSharp.Compiler.Text.Range) FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewLibraryOnlyUnionCaseFieldGet(FSharp.Compiler.Syntax.SynExpr, Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.Ident], Int32, FSharp.Compiler.Text.Range) @@ -7832,7 +7814,6 @@ FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr+JoinIn FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr+Lambda FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr+Lazy FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr+LetOrUse -FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr+LetOrUseBang FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr+LibraryOnlyILAssembly FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr+LibraryOnlyStaticOptimization FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr+LibraryOnlyUnionCaseFieldGet @@ -10353,6 +10334,8 @@ FSharp.Compiler.SyntaxTrivia.SynExprTryWithTrivia: FSharp.Compiler.Text.Range ge FSharp.Compiler.SyntaxTrivia.SynExprTryWithTrivia: FSharp.Compiler.Text.Range get_WithToEndRange() FSharp.Compiler.SyntaxTrivia.SynExprTryWithTrivia: System.String ToString() FSharp.Compiler.SyntaxTrivia.SynExprTryWithTrivia: Void .ctor(FSharp.Compiler.Text.Range, FSharp.Compiler.Text.Range, FSharp.Compiler.Text.Range, FSharp.Compiler.Text.Range) +FSharp.Compiler.SyntaxTrivia.SynExprYieldOrReturnFromTrivia: FSharp.Compiler.SyntaxTrivia.SynExprYieldOrReturnFromTrivia Zero +FSharp.Compiler.SyntaxTrivia.SynExprYieldOrReturnFromTrivia: FSharp.Compiler.SyntaxTrivia.SynExprYieldOrReturnFromTrivia get_Zero() FSharp.Compiler.SyntaxTrivia.SynExprYieldOrReturnFromTrivia: FSharp.Compiler.Text.Range YieldOrReturnFromKeyword FSharp.Compiler.SyntaxTrivia.SynExprYieldOrReturnFromTrivia: FSharp.Compiler.Text.Range get_YieldOrReturnFromKeyword() FSharp.Compiler.SyntaxTrivia.SynExprYieldOrReturnFromTrivia: System.String ToString() diff --git a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.release.bsl b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.release.bsl index 09f0f67af95..32cad895835 100644 --- a/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.release.bsl +++ b/tests/FSharp.Compiler.Service.Tests/FSharp.Compiler.Service.SurfaceArea.netstandard20.release.bsl @@ -7207,8 +7207,12 @@ FSharp.Compiler.Syntax.SynExpr+Lazy: FSharp.Compiler.Syntax.SynExpr expr FSharp.Compiler.Syntax.SynExpr+Lazy: FSharp.Compiler.Syntax.SynExpr get_expr() FSharp.Compiler.Syntax.SynExpr+Lazy: FSharp.Compiler.Text.Range get_range() FSharp.Compiler.Syntax.SynExpr+Lazy: FSharp.Compiler.Text.Range range +FSharp.Compiler.Syntax.SynExpr+LetOrUse: Boolean get_isBang() +FSharp.Compiler.Syntax.SynExpr+LetOrUse: Boolean get_isFromSource() FSharp.Compiler.Syntax.SynExpr+LetOrUse: Boolean get_isRecursive() FSharp.Compiler.Syntax.SynExpr+LetOrUse: Boolean get_isUse() +FSharp.Compiler.Syntax.SynExpr+LetOrUse: Boolean isBang +FSharp.Compiler.Syntax.SynExpr+LetOrUse: Boolean isFromSource FSharp.Compiler.Syntax.SynExpr+LetOrUse: Boolean isRecursive FSharp.Compiler.Syntax.SynExpr+LetOrUse: Boolean isUse FSharp.Compiler.Syntax.SynExpr+LetOrUse: FSharp.Compiler.Syntax.SynExpr body @@ -7219,24 +7223,6 @@ FSharp.Compiler.Syntax.SynExpr+LetOrUse: FSharp.Compiler.Text.Range get_range() FSharp.Compiler.Syntax.SynExpr+LetOrUse: FSharp.Compiler.Text.Range range FSharp.Compiler.Syntax.SynExpr+LetOrUse: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynBinding] bindings FSharp.Compiler.Syntax.SynExpr+LetOrUse: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynBinding] get_bindings() -FSharp.Compiler.Syntax.SynExpr+LetOrUseBang: Boolean get_isFromSource() -FSharp.Compiler.Syntax.SynExpr+LetOrUseBang: Boolean get_isUse() -FSharp.Compiler.Syntax.SynExpr+LetOrUseBang: Boolean isFromSource -FSharp.Compiler.Syntax.SynExpr+LetOrUseBang: Boolean isUse -FSharp.Compiler.Syntax.SynExpr+LetOrUseBang: FSharp.Compiler.Syntax.DebugPointAtBinding bindDebugPoint -FSharp.Compiler.Syntax.SynExpr+LetOrUseBang: FSharp.Compiler.Syntax.DebugPointAtBinding get_bindDebugPoint() -FSharp.Compiler.Syntax.SynExpr+LetOrUseBang: FSharp.Compiler.Syntax.SynExpr body -FSharp.Compiler.Syntax.SynExpr+LetOrUseBang: FSharp.Compiler.Syntax.SynExpr get_body() -FSharp.Compiler.Syntax.SynExpr+LetOrUseBang: FSharp.Compiler.Syntax.SynExpr get_rhs() -FSharp.Compiler.Syntax.SynExpr+LetOrUseBang: FSharp.Compiler.Syntax.SynExpr rhs -FSharp.Compiler.Syntax.SynExpr+LetOrUseBang: FSharp.Compiler.Syntax.SynPat get_pat() -FSharp.Compiler.Syntax.SynExpr+LetOrUseBang: FSharp.Compiler.Syntax.SynPat pat -FSharp.Compiler.Syntax.SynExpr+LetOrUseBang: FSharp.Compiler.SyntaxTrivia.SynExprLetOrUseTrivia get_trivia() -FSharp.Compiler.Syntax.SynExpr+LetOrUseBang: FSharp.Compiler.SyntaxTrivia.SynExprLetOrUseTrivia trivia -FSharp.Compiler.Syntax.SynExpr+LetOrUseBang: FSharp.Compiler.Text.Range get_range() -FSharp.Compiler.Syntax.SynExpr+LetOrUseBang: FSharp.Compiler.Text.Range range -FSharp.Compiler.Syntax.SynExpr+LetOrUseBang: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynBinding] andBangs -FSharp.Compiler.Syntax.SynExpr+LetOrUseBang: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynBinding] get_andBangs() FSharp.Compiler.Syntax.SynExpr+LibraryOnlyILAssembly: FSharp.Compiler.Text.Range get_range() FSharp.Compiler.Syntax.SynExpr+LibraryOnlyILAssembly: FSharp.Compiler.Text.Range range FSharp.Compiler.Syntax.SynExpr+LibraryOnlyILAssembly: Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynExpr] args @@ -7442,7 +7428,6 @@ FSharp.Compiler.Syntax.SynExpr+Tags: Int32 JoinIn FSharp.Compiler.Syntax.SynExpr+Tags: Int32 Lambda FSharp.Compiler.Syntax.SynExpr+Tags: Int32 Lazy FSharp.Compiler.Syntax.SynExpr+Tags: Int32 LetOrUse -FSharp.Compiler.Syntax.SynExpr+Tags: Int32 LetOrUseBang FSharp.Compiler.Syntax.SynExpr+Tags: Int32 LibraryOnlyILAssembly FSharp.Compiler.Syntax.SynExpr+Tags: Int32 LibraryOnlyStaticOptimization FSharp.Compiler.Syntax.SynExpr+Tags: Int32 LibraryOnlyUnionCaseFieldGet @@ -7621,7 +7606,6 @@ FSharp.Compiler.Syntax.SynExpr: Boolean IsJoinIn FSharp.Compiler.Syntax.SynExpr: Boolean IsLambda FSharp.Compiler.Syntax.SynExpr: Boolean IsLazy FSharp.Compiler.Syntax.SynExpr: Boolean IsLetOrUse -FSharp.Compiler.Syntax.SynExpr: Boolean IsLetOrUseBang FSharp.Compiler.Syntax.SynExpr: Boolean IsLibraryOnlyILAssembly FSharp.Compiler.Syntax.SynExpr: Boolean IsLibraryOnlyStaticOptimization FSharp.Compiler.Syntax.SynExpr: Boolean IsLibraryOnlyUnionCaseFieldGet @@ -7692,7 +7676,6 @@ FSharp.Compiler.Syntax.SynExpr: Boolean get_IsJoinIn() FSharp.Compiler.Syntax.SynExpr: Boolean get_IsLambda() FSharp.Compiler.Syntax.SynExpr: Boolean get_IsLazy() FSharp.Compiler.Syntax.SynExpr: Boolean get_IsLetOrUse() -FSharp.Compiler.Syntax.SynExpr: Boolean get_IsLetOrUseBang() FSharp.Compiler.Syntax.SynExpr: Boolean get_IsLibraryOnlyILAssembly() FSharp.Compiler.Syntax.SynExpr: Boolean get_IsLibraryOnlyStaticOptimization() FSharp.Compiler.Syntax.SynExpr: Boolean get_IsLibraryOnlyUnionCaseFieldGet() @@ -7761,8 +7744,7 @@ FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewInterpolatedSt FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewJoinIn(FSharp.Compiler.Syntax.SynExpr, FSharp.Compiler.Text.Range, FSharp.Compiler.Syntax.SynExpr, FSharp.Compiler.Text.Range) FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewLambda(Boolean, Boolean, FSharp.Compiler.Syntax.SynSimplePats, FSharp.Compiler.Syntax.SynExpr, Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynPat],FSharp.Compiler.Syntax.SynExpr]], FSharp.Compiler.Text.Range, FSharp.Compiler.SyntaxTrivia.SynExprLambdaTrivia) FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewLazy(FSharp.Compiler.Syntax.SynExpr, FSharp.Compiler.Text.Range) -FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewLetOrUse(Boolean, Boolean, Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynBinding], FSharp.Compiler.Syntax.SynExpr, FSharp.Compiler.Text.Range, FSharp.Compiler.SyntaxTrivia.SynExprLetOrUseTrivia) -FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewLetOrUseBang(FSharp.Compiler.Syntax.DebugPointAtBinding, Boolean, Boolean, FSharp.Compiler.Syntax.SynPat, FSharp.Compiler.Syntax.SynExpr, Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynBinding], FSharp.Compiler.Syntax.SynExpr, FSharp.Compiler.Text.Range, FSharp.Compiler.SyntaxTrivia.SynExprLetOrUseTrivia) +FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewLetOrUse(Boolean, Boolean, Boolean, Boolean, Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynBinding], FSharp.Compiler.Syntax.SynExpr, FSharp.Compiler.Text.Range, FSharp.Compiler.SyntaxTrivia.SynExprLetOrUseTrivia) FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewLibraryOnlyILAssembly(System.Object, Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynType], Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynExpr], Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynType], FSharp.Compiler.Text.Range) FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewLibraryOnlyStaticOptimization(Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynStaticOptimizationConstraint], FSharp.Compiler.Syntax.SynExpr, FSharp.Compiler.Syntax.SynExpr, FSharp.Compiler.Text.Range) FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewLibraryOnlyUnionCaseFieldGet(FSharp.Compiler.Syntax.SynExpr, Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.Ident], Int32, FSharp.Compiler.Text.Range) @@ -7832,7 +7814,6 @@ FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr+JoinIn FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr+Lambda FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr+Lazy FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr+LetOrUse -FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr+LetOrUseBang FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr+LibraryOnlyILAssembly FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr+LibraryOnlyStaticOptimization FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr+LibraryOnlyUnionCaseFieldGet diff --git a/tests/FSharp.Compiler.Service.Tests/SynPatTests.fs b/tests/FSharp.Compiler.Service.Tests/SynPatTests.fs index 74d87d8919f..35edcc03a98 100644 --- a/tests/FSharp.Compiler.Service.Tests/SynPatTests.fs +++ b/tests/FSharp.Compiler.Service.Tests/SynPatTests.fs @@ -18,6 +18,9 @@ let pats: obj array list = [|[Unneeded; Unneeded]; "let ((Lazy x)) = lazy 1"|] [|[Needed; Unneeded]; "let (()) = ()"|] [|[Needed; Unneeded; Unneeded]; "let ((())) = ()"|] + [|[Needed]; "async { let! (_ : obj) = Unchecked.defaultof<_>; return () }"|] + [|[Unneeded]; "async { let! (A _) = Unchecked.defaultof<_>; return () }"|] + [|[Needed]; "async { let! (x : int) = async { return 3 }"|] ] // `expected` represents whether each parenthesized pattern, from the inside outward, requires its parentheses. diff --git a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl index 5019f375f4a..aad32880f1b 100644 --- a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl +++ b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl @@ -34,7 +34,7 @@ [IL]: Error [StackUnexpected]: : .$FSharpCheckerResults+dataTipOfReferences@2225::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000084][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.AssemblyContent+traverseMemberFunctionAndValues@176::Invoke([FSharp.Compiler.Service]FSharp.Compiler.Symbols.FSharpMemberOrFunctionOrValue)][offset 0x00000059][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.AssemblyContent+traverseEntity@218::GenerateNext([S.P.CoreLib]System.Collections.Generic.IEnumerable`1&)][offset 0x000000DA][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.ParsedInput+visitor@1431-6::VisitExpr([FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, [FSharp.Compiler.Service]FSharp.Compiler.Syntax.SynExpr)][offset 0x00000605][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.ParsedInput+visitor@1422-6::VisitExpr([FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, [FSharp.Compiler.Service]FSharp.Compiler.Syntax.SynExpr)][offset 0x000005FD][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000032][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000003B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-516::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000082][found Char] Unexpected type on the stack. diff --git a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl index f4f182a4ca0..929d9360375 100644 --- a/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl +++ b/tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl @@ -33,7 +33,7 @@ [IL]: Error [StackUnexpected]: : .$FSharpCheckerResults+GetReferenceResolutionStructuredToolTipText@2225::Invoke([FSharp.Core]Microsoft.FSharp.Core.Unit)][offset 0x00000076][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.AssemblyContent+traverseMemberFunctionAndValues@176::Invoke([FSharp.Compiler.Service]FSharp.Compiler.Symbols.FSharpMemberOrFunctionOrValue)][offset 0x0000002B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.AssemblyContent+traverseEntity@218::GenerateNext([S.P.CoreLib]System.Collections.Generic.IEnumerable`1&)][offset 0x000000BB][found Char] Unexpected type on the stack. -[IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.ParsedInput+visitor@1431-11::VisitExpr([FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, [FSharp.Compiler.Service]FSharp.Compiler.Syntax.SynExpr)][offset 0x00000620][found Char] Unexpected type on the stack. +[IL]: Error [StackUnexpected]: : FSharp.Compiler.EditorServices.ParsedInput+visitor@1422-11::VisitExpr([FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, [FSharp.Compiler.Service]FSharp.Compiler.Syntax.SynExpr)][offset 0x00000618][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-531::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000032][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-531::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x0000003B][found Char] Unexpected type on the stack. [IL]: Error [StackUnexpected]: : .$ServiceLexing+clo@924-531::Invoke([FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,Microsoft.FSharp.Core.Unit>)][offset 0x00000064][found Char] Unexpected type on the stack. diff --git a/tests/service/data/SyntaxTree/Binding/InlineKeywordInBinding.fs.bsl b/tests/service/data/SyntaxTree/Binding/InlineKeywordInBinding.fs.bsl index 9d1c6939e3e..e194eb19fab 100644 --- a/tests/service/data/SyntaxTree/Binding/InlineKeywordInBinding.fs.bsl +++ b/tests/service/data/SyntaxTree/Binding/InlineKeywordInBinding.fs.bsl @@ -22,7 +22,7 @@ ImplFile Named (SynIdent (z, None), false, None, (2,15--2,16))], None, (2,11--2,16)), None, LetOrUse - (false, false, + (false, false, true, false, [SynBinding (None, Normal, true, false, [], PreXmlDoc ((3,4), FSharp.Compiler.Xml.XmlDocCollector), diff --git a/tests/service/data/SyntaxTree/Binding/RangeOfEqualSignShouldBePresentInLocalLetBinding.fs.bsl b/tests/service/data/SyntaxTree/Binding/RangeOfEqualSignShouldBePresentInLocalLetBinding.fs.bsl index c54522f64b2..9ff03a69ae4 100644 --- a/tests/service/data/SyntaxTree/Binding/RangeOfEqualSignShouldBePresentInLocalLetBinding.fs.bsl +++ b/tests/service/data/SyntaxTree/Binding/RangeOfEqualSignShouldBePresentInLocalLetBinding.fs.bsl @@ -7,7 +7,7 @@ ImplFile [Expr (Do (LetOrUse - (false, false, + (false, false, true, false, [SynBinding (None, Normal, false, false, [], PreXmlDoc ((3,4), FSharp.Compiler.Xml.XmlDocCollector), diff --git a/tests/service/data/SyntaxTree/Binding/RangeOfEqualSignShouldBePresentInLocalLetBindingTyped.fs.bsl b/tests/service/data/SyntaxTree/Binding/RangeOfEqualSignShouldBePresentInLocalLetBindingTyped.fs.bsl index ce9d335891d..34d155903b7 100644 --- a/tests/service/data/SyntaxTree/Binding/RangeOfEqualSignShouldBePresentInLocalLetBindingTyped.fs.bsl +++ b/tests/service/data/SyntaxTree/Binding/RangeOfEqualSignShouldBePresentInLocalLetBindingTyped.fs.bsl @@ -10,7 +10,7 @@ ImplFile [Expr (Do (LetOrUse - (false, false, + (false, false, true, false, [SynBinding (None, Normal, false, false, [], PreXmlDoc ((3,4), FSharp.Compiler.Xml.XmlDocCollector), diff --git a/tests/service/data/SyntaxTree/Binding/RangeOfLetKeywordShouldBePresentInSynExprLetOrUseBinding.fs.bsl b/tests/service/data/SyntaxTree/Binding/RangeOfLetKeywordShouldBePresentInSynExprLetOrUseBinding.fs.bsl index 2e096ce46f6..c2e98c6a098 100644 --- a/tests/service/data/SyntaxTree/Binding/RangeOfLetKeywordShouldBePresentInSynExprLetOrUseBinding.fs.bsl +++ b/tests/service/data/SyntaxTree/Binding/RangeOfLetKeywordShouldBePresentInSynExprLetOrUseBinding.fs.bsl @@ -16,7 +16,7 @@ ImplFile (None, SynValInfo ([], SynArgInfo ([], false, None)), None), Named (SynIdent (a, None), false, None, (2,4--2,5)), None, LetOrUse - (false, false, + (false, false, true, false, [SynBinding (None, Normal, false, false, [], PreXmlDoc ((3,4), FSharp.Compiler.Xml.XmlDocCollector), diff --git a/tests/service/data/SyntaxTree/ComputationExpression/MultipleSynExprAndBangHaveRangeThatStartsAtAndAndEndsAfterExpression.fs.bsl b/tests/service/data/SyntaxTree/ComputationExpression/MultipleSynExprAndBangHaveRangeThatStartsAtAndAndEndsAfterExpression.fs.bsl index a865a94772e..368037f9df0 100644 --- a/tests/service/data/SyntaxTree/ComputationExpression/MultipleSynExprAndBangHaveRangeThatStartsAtAndAndEndsAfterExpression.fs.bsl +++ b/tests/service/data/SyntaxTree/ComputationExpression/MultipleSynExprAndBangHaveRangeThatStartsAtAndAndEndsAfterExpression.fs.bsl @@ -12,13 +12,25 @@ ImplFile (NonAtomic, false, Ident async, ComputationExpr (false, - LetOrUseBang - (Yes (3,4--3,24), false, true, - Named (SynIdent (bar, None), false, None, (3,9--3,12)), - App - (NonAtomic, false, Ident getBar, - Const (Unit, (3,22--3,24)), (3,15--3,24)), + LetOrUse + (false, false, true, true, [SynBinding + (None, Normal, false, false, [], PreXmlDocEmpty, + SynValData + (None, + SynValInfo ([], SynArgInfo ([], false, None)), + None), + Named + (SynIdent (bar, None), false, None, (3,9--3,12)), + None, + App + (NonAtomic, false, Ident getBar, + Const (Unit, (3,22--3,24)), (3,15--3,24)), + (3,4--6,14), Yes (3,4--3,24), + { LeadingKeyword = Let (3,4--3,8) + InlineKeyword = None + EqualsRange = Some (3,13--3,14) }); + SynBinding (None, Normal, false, false, [], PreXmlDocEmpty, SynValData (None, diff --git a/tests/service/data/SyntaxTree/ComputationExpression/SynExprAndBangRangeStartsAtAndAndEndsAfterExpression.fs.bsl b/tests/service/data/SyntaxTree/ComputationExpression/SynExprAndBangRangeStartsAtAndAndEndsAfterExpression.fs.bsl index c08f43cc9f2..08748e2e1c4 100644 --- a/tests/service/data/SyntaxTree/ComputationExpression/SynExprAndBangRangeStartsAtAndAndEndsAfterExpression.fs.bsl +++ b/tests/service/data/SyntaxTree/ComputationExpression/SynExprAndBangRangeStartsAtAndAndEndsAfterExpression.fs.bsl @@ -12,13 +12,25 @@ ImplFile (NonAtomic, false, Ident async, ComputationExpr (false, - LetOrUseBang - (Yes (3,4--3,24), false, true, - Named (SynIdent (bar, None), false, None, (3,9--3,12)), - App - (NonAtomic, false, Ident getBar, - Const (Unit, (3,22--3,24)), (3,15--3,24)), + LetOrUse + (false, false, true, true, [SynBinding + (None, Normal, false, false, [], PreXmlDocEmpty, + SynValData + (None, + SynValInfo ([], SynArgInfo ([], false, None)), + None), + Named + (SynIdent (bar, None), false, None, (3,9--3,12)), + None, + App + (NonAtomic, false, Ident getBar, + Const (Unit, (3,22--3,24)), (3,15--3,24)), + (3,4--7,14), Yes (3,4--3,24), + { LeadingKeyword = Let (3,4--3,8) + InlineKeyword = None + EqualsRange = Some (3,13--3,14) }); + SynBinding (None, Normal, false, false, [], PreXmlDocEmpty, SynValData (None, diff --git a/tests/service/data/SyntaxTree/Expression/NestedSynExprLetOrUseContainsTheRangeOfInKeyword.fs.bsl b/tests/service/data/SyntaxTree/Expression/NestedSynExprLetOrUseContainsTheRangeOfInKeyword.fs.bsl index fc36bd59dfc..5ff48d7afcc 100644 --- a/tests/service/data/SyntaxTree/Expression/NestedSynExprLetOrUseContainsTheRangeOfInKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/NestedSynExprLetOrUseContainsTheRangeOfInKeyword.fs.bsl @@ -17,7 +17,7 @@ ImplFile Pats [Paren (Const (Unit, (2,6--2,8)), (2,6--2,8))], None, (2,4--2,8)), None, LetOrUse - (false, false, + (false, false, true, false, [SynBinding (None, Normal, false, false, [], PreXmlDoc ((3,4), FSharp.Compiler.Xml.XmlDocCollector), @@ -30,7 +30,7 @@ ImplFile InlineKeyword = None EqualsRange = Some (3,10--3,11) })], LetOrUse - (false, false, + (false, false, true, false, [SynBinding (None, Normal, false, false, [], PreXmlDoc ((4,4), FSharp.Compiler.Xml.XmlDocCollector), diff --git a/tests/service/data/SyntaxTree/Expression/SynExprLetOrUseBangContainsTheRangeOfTheEqualsSign.fs.bsl b/tests/service/data/SyntaxTree/Expression/SynExprLetOrUseBangContainsTheRangeOfTheEqualsSign.fs.bsl index 1155c145819..c05c2e7588b 100644 --- a/tests/service/data/SyntaxTree/Expression/SynExprLetOrUseBangContainsTheRangeOfTheEqualsSign.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/SynExprLetOrUseBangContainsTheRangeOfTheEqualsSign.fs.bsl @@ -11,11 +11,20 @@ ImplFile (NonAtomic, false, Ident comp, ComputationExpr (false, - LetOrUseBang - (Yes (3,4--3,14), false, true, - Named (SynIdent (x, None), false, None, (3,9--3,10)), - Ident y, + LetOrUse + (false, false, true, true, [SynBinding + (None, Normal, false, false, [], PreXmlDocEmpty, + SynValData + (None, + SynValInfo ([], SynArgInfo ([], false, None)), + None), + Named (SynIdent (x, None), false, None, (3,9--3,10)), + None, Ident y, (3,4--5,13), Yes (3,4--3,14), + { LeadingKeyword = Let (3,4--3,8) + InlineKeyword = None + EqualsRange = Some (3,11--3,12) }); + SynBinding (None, Normal, false, false, [], PreXmlDocEmpty, SynValData (None, diff --git a/tests/service/data/SyntaxTree/Expression/SynExprLetOrUseContainsTheRangeOfInKeyword.fs.bsl b/tests/service/data/SyntaxTree/Expression/SynExprLetOrUseContainsTheRangeOfInKeyword.fs.bsl index 37bc9c3b31c..250d3b16d79 100644 --- a/tests/service/data/SyntaxTree/Expression/SynExprLetOrUseContainsTheRangeOfInKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/SynExprLetOrUseContainsTheRangeOfInKeyword.fs.bsl @@ -6,7 +6,7 @@ ImplFile ([SynExprLetOrUseContainsTheRangeOfInKeyword], false, AnonModule, [Expr (LetOrUse - (false, false, + (false, false, true, false, [SynBinding (None, Normal, false, false, [], PreXmlDoc ((2,0), FSharp.Compiler.Xml.XmlDocCollector), diff --git a/tests/service/data/SyntaxTree/Expression/SynExprLetOrUseDoesNotContainTheRangeOfInKeyword.fs.bsl b/tests/service/data/SyntaxTree/Expression/SynExprLetOrUseDoesNotContainTheRangeOfInKeyword.fs.bsl index 05a52bec5e5..1568bde4b7a 100644 --- a/tests/service/data/SyntaxTree/Expression/SynExprLetOrUseDoesNotContainTheRangeOfInKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/SynExprLetOrUseDoesNotContainTheRangeOfInKeyword.fs.bsl @@ -8,7 +8,7 @@ ImplFile [Expr (Do (LetOrUse - (false, false, + (false, false, true, false, [SynBinding (None, Normal, false, false, [], PreXmlDoc ((3,0), FSharp.Compiler.Xml.XmlDocCollector), diff --git a/tests/service/data/SyntaxTree/Expression/SynExprLetOrUseWhereBodyExprStartsWithTokenOfTwoCharactersDoesNotContainTheRangeOfInKeyword.fs.bsl b/tests/service/data/SyntaxTree/Expression/SynExprLetOrUseWhereBodyExprStartsWithTokenOfTwoCharactersDoesNotContainTheRangeOfInKeyword.fs.bsl index 583e33b78ec..4efd29655d0 100644 --- a/tests/service/data/SyntaxTree/Expression/SynExprLetOrUseWhereBodyExprStartsWithTokenOfTwoCharactersDoesNotContainTheRangeOfInKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/SynExprLetOrUseWhereBodyExprStartsWithTokenOfTwoCharactersDoesNotContainTheRangeOfInKeyword.fs.bsl @@ -11,7 +11,7 @@ ImplFile [Expr (Do (LetOrUse - (false, false, + (false, false, true, false, [SynBinding (None, Normal, false, false, [], PreXmlDoc ((3,0), FSharp.Compiler.Xml.XmlDocCollector), diff --git a/tests/service/data/SyntaxTree/Expression/SynExprLetOrUseWithRecursiveBindingContainsTheRangeOfInKeyword.fs.bsl b/tests/service/data/SyntaxTree/Expression/SynExprLetOrUseWithRecursiveBindingContainsTheRangeOfInKeyword.fs.bsl index 692b5495fcb..0f6d62006ba 100644 --- a/tests/service/data/SyntaxTree/Expression/SynExprLetOrUseWithRecursiveBindingContainsTheRangeOfInKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/SynExprLetOrUseWithRecursiveBindingContainsTheRangeOfInKeyword.fs.bsl @@ -10,7 +10,7 @@ ImplFile [Expr (Do (LetOrUse - (true, false, + (true, false, true, false, [SynBinding (None, Normal, false, false, [], PreXmlDoc ((3,4), FSharp.Compiler.Xml.XmlDocCollector), diff --git a/tests/service/data/SyntaxTree/Expression/Try with - Missing expr 04.fs.bsl b/tests/service/data/SyntaxTree/Expression/Try with - Missing expr 04.fs.bsl index f3992cf7040..93be9bc6723 100644 --- a/tests/service/data/SyntaxTree/Expression/Try with - Missing expr 04.fs.bsl +++ b/tests/service/data/SyntaxTree/Expression/Try with - Missing expr 04.fs.bsl @@ -7,7 +7,7 @@ ImplFile [Expr (TryWith (LetOrUse - (false, false, + (false, false, true, false, [SynBinding (None, Normal, false, false, [], PreXmlDoc ((5,0), FSharp.Compiler.Xml.XmlDocCollector), diff --git a/tests/service/data/SyntaxTree/LeadingKeyword/UseKeyword.fs.bsl b/tests/service/data/SyntaxTree/LeadingKeyword/UseKeyword.fs.bsl index 1774b119f59..22fb03d8cfa 100644 --- a/tests/service/data/SyntaxTree/LeadingKeyword/UseKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/LeadingKeyword/UseKeyword.fs.bsl @@ -7,7 +7,7 @@ ImplFile [Expr (Do (LetOrUse - (false, true, + (false, true, true, false, [SynBinding (None, Normal, false, false, [], PreXmlDoc ((3,4), FSharp.Compiler.Xml.XmlDocCollector), diff --git a/tests/service/data/SyntaxTree/LeadingKeyword/UseRecKeyword.fs.bsl b/tests/service/data/SyntaxTree/LeadingKeyword/UseRecKeyword.fs.bsl index aececc8348e..38be60e5029 100644 --- a/tests/service/data/SyntaxTree/LeadingKeyword/UseRecKeyword.fs.bsl +++ b/tests/service/data/SyntaxTree/LeadingKeyword/UseRecKeyword.fs.bsl @@ -7,7 +7,7 @@ ImplFile [Expr (Do (LetOrUse - (true, true, + (true, true, true, false, [SynBinding (None, Normal, false, false, [], PreXmlDoc ((3,4), FSharp.Compiler.Xml.XmlDocCollector), diff --git a/tests/service/data/SyntaxTree/MatchClause/RangeOfMultipleSynMatchClause.fs.bsl b/tests/service/data/SyntaxTree/MatchClause/RangeOfMultipleSynMatchClause.fs.bsl index 19f2154a6c9..0baa92feccc 100644 --- a/tests/service/data/SyntaxTree/MatchClause/RangeOfMultipleSynMatchClause.fs.bsl +++ b/tests/service/data/SyntaxTree/MatchClause/RangeOfMultipleSynMatchClause.fs.bsl @@ -7,7 +7,7 @@ ImplFile [Expr (TryWith (LetOrUse - (false, false, + (false, false, true, false, [SynBinding (None, Normal, false, false, [], PreXmlDoc ((3,4), FSharp.Compiler.Xml.XmlDocCollector), diff --git a/tests/service/data/SyntaxTree/MatchClause/RangeOfSingleSynMatchClause.fs.bsl b/tests/service/data/SyntaxTree/MatchClause/RangeOfSingleSynMatchClause.fs.bsl index e5bbe56cba7..bd05c6d0580 100644 --- a/tests/service/data/SyntaxTree/MatchClause/RangeOfSingleSynMatchClause.fs.bsl +++ b/tests/service/data/SyntaxTree/MatchClause/RangeOfSingleSynMatchClause.fs.bsl @@ -7,7 +7,7 @@ ImplFile [Expr (TryWith (LetOrUse - (false, false, + (false, false, true, false, [SynBinding (None, Normal, false, false, [], PreXmlDoc ((3,4), FSharp.Compiler.Xml.XmlDocCollector), diff --git a/tests/service/data/SyntaxTree/MatchClause/RangeOfSingleSynMatchClauseFollowedByBar.fs.bsl b/tests/service/data/SyntaxTree/MatchClause/RangeOfSingleSynMatchClauseFollowedByBar.fs.bsl index 21f8e8cdb6b..3f955a9be98 100644 --- a/tests/service/data/SyntaxTree/MatchClause/RangeOfSingleSynMatchClauseFollowedByBar.fs.bsl +++ b/tests/service/data/SyntaxTree/MatchClause/RangeOfSingleSynMatchClauseFollowedByBar.fs.bsl @@ -7,7 +7,7 @@ ImplFile [Expr (TryWith (LetOrUse - (false, false, + (false, false, true, false, [SynBinding (None, Normal, false, false, [], PreXmlDoc ((3,4), FSharp.Compiler.Xml.XmlDocCollector), diff --git a/tests/service/data/SyntaxTree/Pattern/Typed - Missing type 05.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Typed - Missing type 05.fs.bsl index d4c056f191b..c3c1bd37e9f 100644 --- a/tests/service/data/SyntaxTree/Pattern/Typed - Missing type 05.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Typed - Missing type 05.fs.bsl @@ -8,7 +8,7 @@ ImplFile (Do (FromParseError (LetOrUse - (false, false, + (false, false, true, false, [SynBinding (None, Normal, false, false, [], PreXmlDoc ((4,4), FSharp.Compiler.Xml.XmlDocCollector), diff --git a/tests/service/data/SyntaxTree/Pattern/Typed - Missing type 06.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Typed - Missing type 06.fs.bsl index 229f126fa39..a38de74e7fe 100644 --- a/tests/service/data/SyntaxTree/Pattern/Typed - Missing type 06.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Typed - Missing type 06.fs.bsl @@ -7,7 +7,7 @@ ImplFile [Expr (Do (LetOrUse - (false, false, + (false, false, true, false, [SynBinding (None, Normal, false, false, [], PreXmlDoc ((4,4), FSharp.Compiler.Xml.XmlDocCollector), diff --git a/tests/service/data/SyntaxTree/Pattern/Typed - Missing type 09.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Typed - Missing type 09.fs.bsl index bf0847e0ea0..cf91e9d594c 100644 --- a/tests/service/data/SyntaxTree/Pattern/Typed - Missing type 09.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Typed - Missing type 09.fs.bsl @@ -7,7 +7,7 @@ ImplFile [Expr (Do (LetOrUse - (false, false, + (false, false, true, false, [SynBinding (None, Normal, false, false, [], PreXmlDoc ((4,4), FSharp.Compiler.Xml.XmlDocCollector), diff --git a/tests/service/data/SyntaxTree/Pattern/Typed - Missing type 10.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Typed - Missing type 10.fs.bsl index 65b1b0d7a95..d76007a4819 100644 --- a/tests/service/data/SyntaxTree/Pattern/Typed - Missing type 10.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Typed - Missing type 10.fs.bsl @@ -7,7 +7,7 @@ ImplFile [Expr (Do (LetOrUse - (false, false, + (false, false, true, false, [SynBinding (None, Normal, false, false, [], PreXmlDoc ((4,4), FSharp.Compiler.Xml.XmlDocCollector), diff --git a/tests/service/data/SyntaxTree/Pattern/Typed - Missing type 11.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Typed - Missing type 11.fs.bsl index 4980b86a481..1afdab1ec2f 100644 --- a/tests/service/data/SyntaxTree/Pattern/Typed - Missing type 11.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Typed - Missing type 11.fs.bsl @@ -7,7 +7,7 @@ ImplFile [Expr (Do (LetOrUse - (false, false, + (false, false, true, false, [SynBinding (None, Normal, false, false, [], PreXmlDoc ((4,4), FSharp.Compiler.Xml.XmlDocCollector), diff --git a/tests/service/data/SyntaxTree/Pattern/Typed - Missing type 12.fs.bsl b/tests/service/data/SyntaxTree/Pattern/Typed - Missing type 12.fs.bsl index b9200e91fd0..1fc723d7ea0 100644 --- a/tests/service/data/SyntaxTree/Pattern/Typed - Missing type 12.fs.bsl +++ b/tests/service/data/SyntaxTree/Pattern/Typed - Missing type 12.fs.bsl @@ -7,7 +7,7 @@ ImplFile [Expr (Do (LetOrUse - (false, false, + (false, false, true, false, [SynBinding (None, Normal, false, false, [], PreXmlDoc ((4,4), FSharp.Compiler.Xml.XmlDocCollector), diff --git a/tests/service/data/SyntaxTree/String/InterpolatedStringOffsideInNestedLet.fs.bsl b/tests/service/data/SyntaxTree/String/InterpolatedStringOffsideInNestedLet.fs.bsl index d8e5ea12eab..5de04dee2f6 100644 --- a/tests/service/data/SyntaxTree/String/InterpolatedStringOffsideInNestedLet.fs.bsl +++ b/tests/service/data/SyntaxTree/String/InterpolatedStringOffsideInNestedLet.fs.bsl @@ -13,7 +13,7 @@ ImplFile (None, SynValInfo ([], SynArgInfo ([], false, None)), None), Named (SynIdent (a, None), false, None, (1,4--1,5)), None, LetOrUse - (false, false, + (false, false, true, false, [SynBinding (None, Normal, false, false, [], PreXmlDoc ((2,4), FSharp.Compiler.Xml.XmlDocCollector), diff --git a/tests/service/data/SyntaxTree/SynType/Typed LetBang 01.fs.bsl b/tests/service/data/SyntaxTree/SynType/Typed LetBang 01.fs.bsl index e0c44d14f8a..0f4d273e213 100644 --- a/tests/service/data/SyntaxTree/SynType/Typed LetBang 01.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Typed LetBang 01.fs.bsl @@ -8,21 +8,31 @@ ImplFile (NonAtomic, false, Ident async, ComputationExpr (false, - LetOrUseBang - (Yes (4,4--4,38), false, true, - Typed - (Named (SynIdent (res, None), false, None, (4,9--4,12)), - LongIdent (SynLongIdent ([int], [], [None])), - (4,9--4,17)), - App - (NonAtomic, false, Ident async, - ComputationExpr - (false, - YieldOrReturn - ((false, true), Const (Int32 1, (4,35--4,36)), - (4,28--4,36), - { YieldOrReturnKeyword = (4,28--4,34) }), - (4,26--4,38)), (4,20--4,38)), [], + LetOrUse + (false, false, true, true, + [SynBinding + (None, Normal, false, false, [], PreXmlDocEmpty, + SynValData + (None, + SynValInfo ([], SynArgInfo ([], false, None)), + None), + Typed + (Named + (SynIdent (res, None), false, None, (4,9--4,12)), + LongIdent (SynLongIdent ([int], [], [None])), + (4,9--4,17)), None, + App + (NonAtomic, false, Ident async, + ComputationExpr + (false, + YieldOrReturn + ((false, true), Const (Int32 1, (4,35--4,36)), + (4,28--4,36), + { YieldOrReturnKeyword = (4,28--4,34) }), + (4,26--4,38)), (4,20--4,38)), (4,4--5,14), + Yes (4,4--4,38), { LeadingKeyword = Let (4,4--4,8) + InlineKeyword = None + EqualsRange = Some (4,18--4,19) })], YieldOrReturn ((false, true), Ident res, (5,4--5,14), { YieldOrReturnKeyword = (5,4--5,10) }), (4,4--5,14), diff --git a/tests/service/data/SyntaxTree/SynType/Typed LetBang 02.fs.bsl b/tests/service/data/SyntaxTree/SynType/Typed LetBang 02.fs.bsl index a104e92410c..f8ad3261565 100644 --- a/tests/service/data/SyntaxTree/SynType/Typed LetBang 02.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Typed LetBang 02.fs.bsl @@ -8,23 +8,33 @@ ImplFile (NonAtomic, false, Ident async, ComputationExpr (false, - LetOrUseBang - (Yes (4,4--4,40), false, true, - Paren - (Typed - (Named - (SynIdent (res, None), false, None, (4,10--4,13)), - LongIdent (SynLongIdent ([int], [], [None])), - (4,10--4,18)), (4,9--4,19)), - App - (NonAtomic, false, Ident async, - ComputationExpr - (false, - YieldOrReturn - ((false, true), Const (Int32 1, (4,37--4,38)), - (4,30--4,38), - { YieldOrReturnKeyword = (4,30--4,36) }), - (4,28--4,40)), (4,22--4,40)), [], + LetOrUse + (false, false, true, true, + [SynBinding + (None, Normal, false, false, [], PreXmlDocEmpty, + SynValData + (None, + SynValInfo ([], SynArgInfo ([], false, None)), + None), + Paren + (Typed + (Named + (SynIdent (res, None), false, None, + (4,10--4,13)), + LongIdent (SynLongIdent ([int], [], [None])), + (4,10--4,18)), (4,9--4,19)), None, + App + (NonAtomic, false, Ident async, + ComputationExpr + (false, + YieldOrReturn + ((false, true), Const (Int32 1, (4,37--4,38)), + (4,30--4,38), + { YieldOrReturnKeyword = (4,30--4,36) }), + (4,28--4,40)), (4,22--4,40)), (4,4--5,14), + Yes (4,4--4,40), { LeadingKeyword = Let (4,4--4,8) + InlineKeyword = None + EqualsRange = Some (4,20--4,21) })], YieldOrReturn ((false, true), Ident res, (5,4--5,14), { YieldOrReturnKeyword = (5,4--5,10) }), (4,4--5,14), diff --git a/tests/service/data/SyntaxTree/SynType/Typed LetBang 03.fs.bsl b/tests/service/data/SyntaxTree/SynType/Typed LetBang 03.fs.bsl index e0f29e22664..10dd0e5bd4f 100644 --- a/tests/service/data/SyntaxTree/SynType/Typed LetBang 03.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Typed LetBang 03.fs.bsl @@ -9,7 +9,7 @@ ImplFile ComputationExpr (false, LetOrUse - (false, false, + (false, false, true, false, [SynBinding (None, Normal, false, false, [], PreXmlDoc ((4,4), FSharp.Compiler.Xml.XmlDocCollector), @@ -43,38 +43,50 @@ ImplFile { LeadingKeyword = Let (4,4--4,7) InlineKeyword = None EqualsRange = Some (4,25--4,26) })], - LetOrUseBang - (Yes (5,4--5,49), false, true, - Paren - (Tuple - (false, - [Typed - (Named - (SynIdent (c, None), false, None, - (5,10--5,11)), - LongIdent (SynLongIdent ([int], [], [None])), - (5,10--5,16)); - Typed - (Named - (SynIdent (d, None), false, None, - (5,18--5,19)), - LongIdent (SynLongIdent ([int], [], [None])), - (5,18--5,24))], [(5,16--5,17)], (5,10--5,24)), - (5,9--5,25)), - App - (NonAtomic, false, Ident async, - ComputationExpr - (false, - YieldOrReturn - ((false, true), - Tuple - (false, - [Const (Int32 1, (5,43--5,44)); - Const (Int32 3, (5,46--5,47))], - [(5,44--5,45)], (5,43--5,47)), - (5,36--5,47), - { YieldOrReturnKeyword = (5,36--5,42) }), - (5,34--5,49)), (5,28--5,49)), [], + LetOrUse + (false, false, true, true, + [SynBinding + (None, Normal, false, false, [], PreXmlDocEmpty, + SynValData + (None, + SynValInfo ([], SynArgInfo ([], false, None)), + None), + Paren + (Tuple + (false, + [Typed + (Named + (SynIdent (c, None), false, None, + (5,10--5,11)), + LongIdent + (SynLongIdent ([int], [], [None])), + (5,10--5,16)); + Typed + (Named + (SynIdent (d, None), false, None, + (5,18--5,19)), + LongIdent + (SynLongIdent ([int], [], [None])), + (5,18--5,24))], [(5,16--5,17)], + (5,10--5,24)), (5,9--5,25)), None, + App + (NonAtomic, false, Ident async, + ComputationExpr + (false, + YieldOrReturn + ((false, true), + Tuple + (false, + [Const (Int32 1, (5,43--5,44)); + Const (Int32 3, (5,46--5,47))], + [(5,44--5,45)], (5,43--5,47)), + (5,36--5,47), + { YieldOrReturnKeyword = (5,36--5,42) }), + (5,34--5,49)), (5,28--5,49)), (5,4--6,24), + Yes (5,4--5,49), + { LeadingKeyword = Let (5,4--5,8) + InlineKeyword = None + EqualsRange = Some (5,26--5,27) })], YieldOrReturn ((false, true), App diff --git a/tests/service/data/SyntaxTree/SynType/Typed LetBang 04.fs.bsl b/tests/service/data/SyntaxTree/SynType/Typed LetBang 04.fs.bsl index cd28aa03595..cf228ae258e 100644 --- a/tests/service/data/SyntaxTree/SynType/Typed LetBang 04.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Typed LetBang 04.fs.bsl @@ -11,7 +11,7 @@ ImplFile Tuple (false, [LetOrUse - (false, false, + (false, false, true, false, [SynBinding (None, Normal, false, false, [], PreXmlDoc ((4,4), FSharp.Compiler.Xml.XmlDocCollector), diff --git a/tests/service/data/SyntaxTree/SynType/Typed LetBang 05.fs.bsl b/tests/service/data/SyntaxTree/SynType/Typed LetBang 05.fs.bsl index d93e009f5d7..d56b8878728 100644 --- a/tests/service/data/SyntaxTree/SynType/Typed LetBang 05.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Typed LetBang 05.fs.bsl @@ -4,35 +4,54 @@ ImplFile [SynModuleOrNamespace ([Module], false, NamedModule, [Expr - (LetOrUseBang - (Yes (2,0--2,31), false, true, - Typed - (Named (SynIdent (x, None), false, None, (2,5--2,6)), - LongIdent (SynLongIdent ([int], [], [None])), (2,5--2,10)), - App - (NonAtomic, false, Ident async, - ComputationExpr - (false, - YieldOrReturn - ((false, true), Const (Int32 1, (2,28--2,29)), - (2,21--2,29), { YieldOrReturnKeyword = (2,21--2,27) }), - (2,19--2,31)), (2,13--2,31)), [], - LetOrUseBang - (Yes (3,0--3,33), false, true, - Paren - (Typed - (Named (SynIdent (y, None), false, None, (3,6--3,7)), - LongIdent (SynLongIdent ([int], [], [None])), - (3,6--3,11)), (3,5--3,12)), - App - (NonAtomic, false, Ident async, - ComputationExpr - (false, - YieldOrReturn - ((false, true), Const (Int32 2, (3,30--3,31)), - (3,23--3,31), - { YieldOrReturnKeyword = (3,23--3,29) }), - (3,21--3,33)), (3,15--3,33)), [], + (LetOrUse + (false, false, true, true, + [SynBinding + (None, Normal, false, false, [], PreXmlDocEmpty, + SynValData + (None, SynValInfo ([], SynArgInfo ([], false, None)), + None), + Typed + (Named (SynIdent (x, None), false, None, (2,5--2,6)), + LongIdent (SynLongIdent ([int], [], [None])), + (2,5--2,10)), None, + App + (NonAtomic, false, Ident async, + ComputationExpr + (false, + YieldOrReturn + ((false, true), Const (Int32 1, (2,28--2,29)), + (2,21--2,29), + { YieldOrReturnKeyword = (2,21--2,27) }), + (2,19--2,31)), (2,13--2,31)), (2,0--3,33), + Yes (2,0--2,31), { LeadingKeyword = Let (2,0--2,4) + InlineKeyword = None + EqualsRange = Some (2,11--2,12) })], + LetOrUse + (false, false, true, true, + [SynBinding + (None, Normal, false, false, [], PreXmlDocEmpty, + SynValData + (None, SynValInfo ([], SynArgInfo ([], false, None)), + None), + Paren + (Typed + (Named + (SynIdent (y, None), false, None, (3,6--3,7)), + LongIdent (SynLongIdent ([int], [], [None])), + (3,6--3,11)), (3,5--3,12)), None, + App + (NonAtomic, false, Ident async, + ComputationExpr + (false, + YieldOrReturn + ((false, true), Const (Int32 2, (3,30--3,31)), + (3,23--3,31), + { YieldOrReturnKeyword = (3,23--3,29) }), + (3,21--3,33)), (3,15--3,33)), (3,0--3,33), + Yes (3,0--3,33), { LeadingKeyword = Let (3,0--3,4) + InlineKeyword = None + EqualsRange = Some (3,13--3,14) })], ImplicitZero (3,33--3,33), (3,0--3,33), { LetOrUseKeyword = (3,0--3,4) InKeyword = None diff --git a/tests/service/data/SyntaxTree/SynType/Typed LetBang 06.fs.bsl b/tests/service/data/SyntaxTree/SynType/Typed LetBang 06.fs.bsl index 77623805e3a..35f0c186578 100644 --- a/tests/service/data/SyntaxTree/SynType/Typed LetBang 06.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Typed LetBang 06.fs.bsl @@ -4,35 +4,53 @@ ImplFile [SynModuleOrNamespace ([Module], false, NamedModule, [Expr - (LetOrUseBang - (Yes (2,0--2,31), false, true, - Typed - (Wild (2,5--2,6), - LongIdent (SynLongIdent ([int], [], [None])), (2,5--2,10)), - App - (NonAtomic, false, Ident async, - ComputationExpr - (false, - YieldOrReturn - ((false, true), Const (Int32 1, (2,28--2,29)), - (2,21--2,29), { YieldOrReturnKeyword = (2,21--2,27) }), - (2,19--2,31)), (2,13--2,31)), [], - LetOrUseBang - (Yes (3,0--3,33), false, true, - Paren - (Typed - (Wild (3,6--3,7), - LongIdent (SynLongIdent ([int], [], [None])), - (3,6--3,11)), (3,5--3,12)), - App - (NonAtomic, false, Ident async, - ComputationExpr - (false, - YieldOrReturn - ((false, true), Const (Int32 2, (3,30--3,31)), - (3,23--3,31), - { YieldOrReturnKeyword = (3,23--3,29) }), - (3,21--3,33)), (3,15--3,33)), [], + (LetOrUse + (false, false, true, true, + [SynBinding + (None, Normal, false, false, [], PreXmlDocEmpty, + SynValData + (None, SynValInfo ([], SynArgInfo ([], false, None)), + None), + Typed + (Wild (2,5--2,6), + LongIdent (SynLongIdent ([int], [], [None])), + (2,5--2,10)), None, + App + (NonAtomic, false, Ident async, + ComputationExpr + (false, + YieldOrReturn + ((false, true), Const (Int32 1, (2,28--2,29)), + (2,21--2,29), + { YieldOrReturnKeyword = (2,21--2,27) }), + (2,19--2,31)), (2,13--2,31)), (2,0--3,33), + Yes (2,0--2,31), { LeadingKeyword = Let (2,0--2,4) + InlineKeyword = None + EqualsRange = Some (2,11--2,12) })], + LetOrUse + (false, false, true, true, + [SynBinding + (None, Normal, false, false, [], PreXmlDocEmpty, + SynValData + (None, SynValInfo ([], SynArgInfo ([], false, None)), + None), + Paren + (Typed + (Wild (3,6--3,7), + LongIdent (SynLongIdent ([int], [], [None])), + (3,6--3,11)), (3,5--3,12)), None, + App + (NonAtomic, false, Ident async, + ComputationExpr + (false, + YieldOrReturn + ((false, true), Const (Int32 2, (3,30--3,31)), + (3,23--3,31), + { YieldOrReturnKeyword = (3,23--3,29) }), + (3,21--3,33)), (3,15--3,33)), (3,0--3,33), + Yes (3,0--3,33), { LeadingKeyword = Let (3,0--3,4) + InlineKeyword = None + EqualsRange = Some (3,13--3,14) })], ImplicitZero (3,33--3,33), (3,0--3,33), { LetOrUseKeyword = (3,0--3,4) InKeyword = None diff --git a/tests/service/data/SyntaxTree/SynType/Typed LetBang 07.fs.bsl b/tests/service/data/SyntaxTree/SynType/Typed LetBang 07.fs.bsl index ec976f9d78d..0abee0c68bc 100644 --- a/tests/service/data/SyntaxTree/SynType/Typed LetBang 07.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Typed LetBang 07.fs.bsl @@ -8,20 +8,30 @@ ImplFile (NonAtomic, false, Ident async, ComputationExpr (false, - LetOrUseBang - (Yes (3,4--3,50), false, true, - Paren - (Typed - (Record - ([(([], Name), Some (3,17--3,18), - Named - (SynIdent (name, None), false, None, - (3,19--3,23)))], (3,10--3,25)), - LongIdent (SynLongIdent ([Person], [], [None])), - (3,10--3,33)), (3,9--3,34)), - App - (Atomic, false, Ident asyncPerson, - Const (Unit, (3,48--3,50)), (3,37--3,50)), [], + LetOrUse + (false, false, true, true, + [SynBinding + (None, Normal, false, false, [], PreXmlDocEmpty, + SynValData + (None, + SynValInfo ([], SynArgInfo ([], false, None)), + None), + Paren + (Typed + (Record + ([(([], Name), Some (3,17--3,18), + Named + (SynIdent (name, None), false, None, + (3,19--3,23)))], (3,10--3,25)), + LongIdent (SynLongIdent ([Person], [], [None])), + (3,10--3,33)), (3,9--3,34)), None, + App + (Atomic, false, Ident asyncPerson, + Const (Unit, (3,48--3,50)), (3,37--3,50)), + (3,4--5,15), Yes (3,4--3,50), + { LeadingKeyword = Let (3,4--3,8) + InlineKeyword = None + EqualsRange = Some (3,35--3,36) })], YieldOrReturn ((false, true), Ident name, (5,4--5,15), { YieldOrReturnKeyword = (5,4--5,10) }), (3,4--5,15), diff --git a/tests/service/data/SyntaxTree/SynType/Typed LetBang 08.fs.bsl b/tests/service/data/SyntaxTree/SynType/Typed LetBang 08.fs.bsl index df08719e64d..8bb584f47e5 100644 --- a/tests/service/data/SyntaxTree/SynType/Typed LetBang 08.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Typed LetBang 08.fs.bsl @@ -8,19 +8,29 @@ ImplFile (NonAtomic, false, Ident async, ComputationExpr (false, - LetOrUseBang - (Yes (3,4--3,48), false, true, - Typed - (Record - ([(([], Name), Some (3,16--3,17), - Named - (SynIdent (name, None), false, None, - (3,18--3,22)))], (3,9--3,24)), - LongIdent (SynLongIdent ([Person], [], [None])), - (3,9--3,32)), - App - (Atomic, false, Ident asyncPerson, - Const (Unit, (3,46--3,48)), (3,35--3,48)), [], + LetOrUse + (false, false, true, true, + [SynBinding + (None, Normal, false, false, [], PreXmlDocEmpty, + SynValData + (None, + SynValInfo ([], SynArgInfo ([], false, None)), + None), + Typed + (Record + ([(([], Name), Some (3,16--3,17), + Named + (SynIdent (name, None), false, None, + (3,18--3,22)))], (3,9--3,24)), + LongIdent (SynLongIdent ([Person], [], [None])), + (3,9--3,32)), None, + App + (Atomic, false, Ident asyncPerson, + Const (Unit, (3,46--3,48)), (3,35--3,48)), + (3,4--4,15), Yes (3,4--3,48), + { LeadingKeyword = Let (3,4--3,8) + InlineKeyword = None + EqualsRange = Some (3,33--3,34) })], YieldOrReturn ((false, true), Ident name, (4,4--4,15), { YieldOrReturnKeyword = (4,4--4,10) }), (3,4--4,15), diff --git a/tests/service/data/SyntaxTree/SynType/Typed LetBang 09.fs.bsl b/tests/service/data/SyntaxTree/SynType/Typed LetBang 09.fs.bsl index f60b9363710..f763aa8321c 100644 --- a/tests/service/data/SyntaxTree/SynType/Typed LetBang 09.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Typed LetBang 09.fs.bsl @@ -8,19 +8,29 @@ ImplFile (NonAtomic, false, Ident async, ComputationExpr (false, - LetOrUseBang - (Yes (3,4--3,38), false, true, - Paren - (LongIdent - (SynLongIdent ([Union], [], [None]), None, None, - Pats - [Named - (SynIdent (value, None), false, None, - (3,16--3,21))], None, (3,10--3,21)), - (3,9--3,22)), - App - (Atomic, false, Ident asyncOption, - Const (Unit, (3,36--3,38)), (3,25--3,38)), [], + LetOrUse + (false, false, true, true, + [SynBinding + (None, Normal, false, false, [], PreXmlDocEmpty, + SynValData + (None, + SynValInfo ([], SynArgInfo ([], false, None)), + None), + Paren + (LongIdent + (SynLongIdent ([Union], [], [None]), None, None, + Pats + [Named + (SynIdent (value, None), false, None, + (3,16--3,21))], None, (3,10--3,21)), + (3,9--3,22)), None, + App + (Atomic, false, Ident asyncOption, + Const (Unit, (3,36--3,38)), (3,25--3,38)), + (3,4--4,16), Yes (3,4--3,38), + { LeadingKeyword = Let (3,4--3,8) + InlineKeyword = None + EqualsRange = Some (3,23--3,24) })], YieldOrReturn ((false, true), Ident value, (4,4--4,16), { YieldOrReturnKeyword = (4,4--4,10) }), (3,4--4,16), diff --git a/tests/service/data/SyntaxTree/SynType/Typed LetBang 10.fs.bsl b/tests/service/data/SyntaxTree/SynType/Typed LetBang 10.fs.bsl index 43d9f3e2fe9..2547a09caba 100644 --- a/tests/service/data/SyntaxTree/SynType/Typed LetBang 10.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Typed LetBang 10.fs.bsl @@ -8,17 +8,27 @@ ImplFile (NonAtomic, false, Ident async, ComputationExpr (false, - LetOrUseBang - (Yes (3,4--3,36), false, true, - LongIdent - (SynLongIdent ([Union], [], [None]), None, None, - Pats - [Named - (SynIdent (value, None), false, None, - (3,15--3,20))], None, (3,9--3,20)), - App - (Atomic, false, Ident asyncOption, - Const (Unit, (3,34--3,36)), (3,23--3,36)), [], + LetOrUse + (false, false, true, true, + [SynBinding + (None, Normal, false, false, [], PreXmlDocEmpty, + SynValData + (None, + SynValInfo ([], SynArgInfo ([], false, None)), + None), + LongIdent + (SynLongIdent ([Union], [], [None]), None, None, + Pats + [Named + (SynIdent (value, None), false, None, + (3,15--3,20))], None, (3,9--3,20)), None, + App + (Atomic, false, Ident asyncOption, + Const (Unit, (3,34--3,36)), (3,23--3,36)), + (3,4--4,16), Yes (3,4--3,36), + { LeadingKeyword = Let (3,4--3,8) + InlineKeyword = None + EqualsRange = Some (3,21--3,22) })], YieldOrReturn ((false, true), Ident value, (4,4--4,16), { YieldOrReturnKeyword = (4,4--4,10) }), (3,4--4,16), diff --git a/tests/service/data/SyntaxTree/SynType/Typed LetBang 11.fs.bsl b/tests/service/data/SyntaxTree/SynType/Typed LetBang 11.fs.bsl index 10b908ae70f..d6dd478ef51 100644 --- a/tests/service/data/SyntaxTree/SynType/Typed LetBang 11.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Typed LetBang 11.fs.bsl @@ -8,25 +8,37 @@ ImplFile (NonAtomic, false, Ident async, ComputationExpr (false, - LetOrUseBang - (Yes (3,4--3,50), false, true, - Typed - (Paren - (LongIdent - (SynLongIdent ([Union], [], [None]), None, None, - Pats - [Named - (SynIdent (value, None), false, None, - (3,16--3,21))], None, (3,10--3,21)), - (3,9--3,22)), - App - (LongIdent (SynLongIdent ([option], [], [None])), - None, - [LongIdent (SynLongIdent ([int], [], [None]))], [], - None, true, (3,24--3,34)), (3,9--3,34)), - App - (Atomic, false, Ident asyncOption, - Const (Unit, (3,48--3,50)), (3,37--3,50)), [], + LetOrUse + (false, false, true, true, + [SynBinding + (None, Normal, false, false, [], PreXmlDocEmpty, + SynValData + (None, + SynValInfo ([], SynArgInfo ([], false, None)), + None), + Typed + (Paren + (LongIdent + (SynLongIdent ([Union], [], [None]), None, + None, + Pats + [Named + (SynIdent (value, None), false, None, + (3,16--3,21))], None, (3,10--3,21)), + (3,9--3,22)), + App + (LongIdent (SynLongIdent ([option], [], [None])), + None, + [LongIdent (SynLongIdent ([int], [], [None]))], + [], None, true, (3,24--3,34)), (3,9--3,34)), + None, + App + (Atomic, false, Ident asyncOption, + Const (Unit, (3,48--3,50)), (3,37--3,50)), + (3,4--4,16), Yes (3,4--3,50), + { LeadingKeyword = Let (3,4--3,8) + InlineKeyword = None + EqualsRange = Some (3,35--3,36) })], YieldOrReturn ((false, true), Ident value, (4,4--4,16), { YieldOrReturnKeyword = (4,4--4,10) }), (3,4--4,16), diff --git a/tests/service/data/SyntaxTree/SynType/Typed LetBang 12.fs.bsl b/tests/service/data/SyntaxTree/SynType/Typed LetBang 12.fs.bsl index 129c53c43f2..d5577c184d6 100644 --- a/tests/service/data/SyntaxTree/SynType/Typed LetBang 12.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Typed LetBang 12.fs.bsl @@ -8,23 +8,34 @@ ImplFile (NonAtomic, false, Ident async, ComputationExpr (false, - LetOrUseBang - (Yes (3,4--3,48), false, true, - Typed - (LongIdent - (SynLongIdent ([Union], [], [None]), None, None, - Pats - [Named - (SynIdent (value, None), false, None, - (3,15--3,20))], None, (3,9--3,20)), - App - (LongIdent (SynLongIdent ([option], [], [None])), - None, - [LongIdent (SynLongIdent ([int], [], [None]))], [], - None, true, (3,22--3,32)), (3,9--3,32)), - App - (Atomic, false, Ident asyncOption, - Const (Unit, (3,46--3,48)), (3,35--3,48)), [], + LetOrUse + (false, false, true, true, + [SynBinding + (None, Normal, false, false, [], PreXmlDocEmpty, + SynValData + (None, + SynValInfo ([], SynArgInfo ([], false, None)), + None), + Typed + (LongIdent + (SynLongIdent ([Union], [], [None]), None, None, + Pats + [Named + (SynIdent (value, None), false, None, + (3,15--3,20))], None, (3,9--3,20)), + App + (LongIdent (SynLongIdent ([option], [], [None])), + None, + [LongIdent (SynLongIdent ([int], [], [None]))], + [], None, true, (3,22--3,32)), (3,9--3,32)), + None, + App + (Atomic, false, Ident asyncOption, + Const (Unit, (3,46--3,48)), (3,35--3,48)), + (3,4--4,16), Yes (3,4--3,48), + { LeadingKeyword = Let (3,4--3,8) + InlineKeyword = None + EqualsRange = Some (3,33--3,34) })], YieldOrReturn ((false, true), Ident value, (4,4--4,16), { YieldOrReturnKeyword = (4,4--4,10) }), (3,4--4,16), diff --git a/tests/service/data/SyntaxTree/SynType/Typed LetBang 14.fs.bsl b/tests/service/data/SyntaxTree/SynType/Typed LetBang 14.fs.bsl index cbb7adec174..e51ad87b8e7 100644 --- a/tests/service/data/SyntaxTree/SynType/Typed LetBang 14.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Typed LetBang 14.fs.bsl @@ -8,21 +8,32 @@ ImplFile (NonAtomic, false, Ident async, ComputationExpr (false, - LetOrUseBang - (Yes (4,4--4,31), false, true, - Typed - (Paren - (As - (Named - (SynIdent (x, None), false, None, (4,10--4,11)), - Named - (SynIdent (y, None), false, None, (4,15--4,16)), - (4,10--4,16)), (4,9--4,17)), - FromParseError (4,18--4,18), (4,9--4,18)), - App - (Atomic, false, Ident asyncInt, - Const (Unit, (4,29--4,31)), (4,21--4,31)), + LetOrUse + (false, false, true, true, [SynBinding + (None, Normal, false, false, [], PreXmlDocEmpty, + SynValData + (None, + SynValInfo ([], SynArgInfo ([], false, None)), + None), + Typed + (Paren + (As + (Named + (SynIdent (x, None), false, None, + (4,10--4,11)), + Named + (SynIdent (y, None), false, None, + (4,15--4,16)), (4,10--4,16)), (4,9--4,17)), + FromParseError (4,18--4,18), (4,9--4,18)), None, + App + (Atomic, false, Ident asyncInt, + Const (Unit, (4,29--4,31)), (4,21--4,31)), + (4,4--6,16), Yes (4,4--4,31), + { LeadingKeyword = Let (4,4--4,8) + InlineKeyword = None + EqualsRange = Some (4,19--4,20) }); + SynBinding (None, Normal, false, false, [], PreXmlDocEmpty, SynValData (None, diff --git a/tests/service/data/SyntaxTree/SynType/Typed LetBang 15.fs.bsl b/tests/service/data/SyntaxTree/SynType/Typed LetBang 15.fs.bsl index a199310f6a3..722bf1ceb6a 100644 --- a/tests/service/data/SyntaxTree/SynType/Typed LetBang 15.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Typed LetBang 15.fs.bsl @@ -8,20 +8,31 @@ ImplFile (NonAtomic, false, Ident async, ComputationExpr (false, - LetOrUseBang - (Yes (4,4--5,41), false, true, - Typed - (Paren - (As - (Named - (SynIdent (x, None), false, None, (4,10--4,11)), - Named - (SynIdent (y, None), false, None, (4,15--4,16)), - (4,10--4,16)), (4,9--4,17)), - FromParseError (4,18--4,18), (4,9--4,18)), - App - (Atomic, false, Ident asyncString, - Const (Unit, (5,39--5,41)), (5,28--5,41)), [], + LetOrUse + (false, false, true, true, + [SynBinding + (None, Normal, false, false, [], PreXmlDocEmpty, + SynValData + (None, + SynValInfo ([], SynArgInfo ([], false, None)), + None), + Typed + (Paren + (As + (Named + (SynIdent (x, None), false, None, + (4,10--4,11)), + Named + (SynIdent (y, None), false, None, + (4,15--4,16)), (4,10--4,16)), (4,9--4,17)), + FromParseError (4,18--4,18), (4,9--4,18)), None, + App + (Atomic, false, Ident asyncString, + Const (Unit, (5,39--5,41)), (5,28--5,41)), + (4,4--6,16), Yes (4,4--5,41), + { LeadingKeyword = Let (4,4--4,8) + InlineKeyword = None + EqualsRange = Some (5,26--5,27) })], YieldOrReturn ((false, true), App diff --git a/tests/service/data/SyntaxTree/SynType/Typed LetBang 17.fs.bsl b/tests/service/data/SyntaxTree/SynType/Typed LetBang 17.fs.bsl index 25505e0b9e6..b6adc9e3f2f 100644 --- a/tests/service/data/SyntaxTree/SynType/Typed LetBang 17.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Typed LetBang 17.fs.bsl @@ -25,26 +25,36 @@ ImplFile InlineKeyword = None EqualsRange = Some (3,21--3,22) })], (3,0--3,24)); Expr - (LetOrUseBang - (Yes (5,0--5,42), false, true, - Paren - (Typed - (As - (LongIdent - (SynLongIdent ([Even], [], [None]), None, None, - Pats [], None, (5,6--5,10)), - Named (SynIdent (x, None), false, None, (5,14--5,15)), - (5,6--5,15)), - LongIdent (SynLongIdent ([int], [], [None])), (5,6--5,20)), - (5,5--5,21)), - App - (NonAtomic, false, Ident async, - ComputationExpr - (false, - YieldOrReturn - ((false, true), Const (Int32 2, (5,39--5,40)), - (5,32--5,40), { YieldOrReturnKeyword = (5,32--5,38) }), - (5,30--5,42)), (5,24--5,42)), [], + (LetOrUse + (false, false, true, true, + [SynBinding + (None, Normal, false, false, [], PreXmlDocEmpty, + SynValData + (None, SynValInfo ([], SynArgInfo ([], false, None)), + None), + Paren + (Typed + (As + (LongIdent + (SynLongIdent ([Even], [], [None]), None, None, + Pats [], None, (5,6--5,10)), + Named + (SynIdent (x, None), false, None, (5,14--5,15)), + (5,6--5,15)), + LongIdent (SynLongIdent ([int], [], [None])), + (5,6--5,20)), (5,5--5,21)), None, + App + (NonAtomic, false, Ident async, + ComputationExpr + (false, + YieldOrReturn + ((false, true), Const (Int32 2, (5,39--5,40)), + (5,32--5,40), + { YieldOrReturnKeyword = (5,32--5,38) }), + (5,30--5,42)), (5,24--5,42)), (5,0--5,42), + Yes (5,0--5,42), { LeadingKeyword = Let (5,0--5,4) + InlineKeyword = None + EqualsRange = Some (5,22--5,23) })], ImplicitZero (5,42--5,42), (5,0--5,42), { LetOrUseKeyword = (5,0--5,4) InKeyword = None diff --git a/tests/service/data/SyntaxTree/SynType/Typed LetBang 18.fs.bsl b/tests/service/data/SyntaxTree/SynType/Typed LetBang 18.fs.bsl index 180faf48052..1acf38da849 100644 --- a/tests/service/data/SyntaxTree/SynType/Typed LetBang 18.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Typed LetBang 18.fs.bsl @@ -28,24 +28,34 @@ ImplFile InlineKeyword = None EqualsRange = Some (3,19--3,20) })], (3,0--3,22)); Expr - (LetOrUseBang - (Yes (5,0--5,40), false, true, - Typed - (As - (LongIdent - (SynLongIdent ([Even], [], [None]), None, None, Pats [], - None, (5,5--5,9)), - Named (SynIdent (x, None), false, None, (5,13--5,14)), - (5,5--5,14)), - LongIdent (SynLongIdent ([int], [], [None])), (5,5--5,19)), - App - (NonAtomic, false, Ident async, - ComputationExpr - (false, - YieldOrReturn - ((false, true), Const (Int32 2, (5,37--5,38)), - (5,30--5,38), { YieldOrReturnKeyword = (5,30--5,36) }), - (5,28--5,40)), (5,22--5,40)), [], + (LetOrUse + (false, false, true, true, + [SynBinding + (None, Normal, false, false, [], PreXmlDocEmpty, + SynValData + (None, SynValInfo ([], SynArgInfo ([], false, None)), + None), + Typed + (As + (LongIdent + (SynLongIdent ([Even], [], [None]), None, None, + Pats [], None, (5,5--5,9)), + Named (SynIdent (x, None), false, None, (5,13--5,14)), + (5,5--5,14)), + LongIdent (SynLongIdent ([int], [], [None])), + (5,5--5,19)), None, + App + (NonAtomic, false, Ident async, + ComputationExpr + (false, + YieldOrReturn + ((false, true), Const (Int32 2, (5,37--5,38)), + (5,30--5,38), + { YieldOrReturnKeyword = (5,30--5,36) }), + (5,28--5,40)), (5,22--5,40)), (5,0--5,40), + Yes (5,0--5,40), { LeadingKeyword = Let (5,0--5,4) + InlineKeyword = None + EqualsRange = Some (5,20--5,21) })], ImplicitZero (5,40--5,40), (5,0--5,40), { LetOrUseKeyword = (5,0--5,4) InKeyword = None diff --git a/tests/service/data/SyntaxTree/SynType/Typed LetBang 19.fs.bsl b/tests/service/data/SyntaxTree/SynType/Typed LetBang 19.fs.bsl index ecd65b24301..435268c269e 100644 --- a/tests/service/data/SyntaxTree/SynType/Typed LetBang 19.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Typed LetBang 19.fs.bsl @@ -9,7 +9,7 @@ ImplFile ComputationExpr (false, LetOrUse - (false, false, + (false, false, true, false, [SynBinding (None, Normal, false, false, [], PreXmlDoc ((4,4), FSharp.Compiler.Xml.XmlDocCollector), @@ -32,28 +32,40 @@ ImplFile Yes (4,4--4,28), { LeadingKeyword = Let (4,4--4,7) InlineKeyword = None EqualsRange = Some (4,25--4,26) })], - LetOrUseBang - (Yes (5,4--5,46), false, true, - Paren - (Typed - (As - (LongIdent - (SynLongIdent ([Even], [], [None]), None, - None, Pats [], None, (5,10--5,14)), - Named - (SynIdent (x, None), false, None, - (5,18--5,19)), (5,10--5,19)), - LongIdent (SynLongIdent ([int], [], [None])), - (5,10--5,24)), (5,9--5,25)), - App - (NonAtomic, false, Ident async, - ComputationExpr - (false, - YieldOrReturn - ((false, true), Const (Int32 2, (5,43--5,44)), - (5,36--5,44), - { YieldOrReturnKeyword = (5,36--5,42) }), - (5,34--5,46)), (5,28--5,46)), [], + LetOrUse + (false, false, true, true, + [SynBinding + (None, Normal, false, false, [], PreXmlDocEmpty, + SynValData + (None, + SynValInfo ([], SynArgInfo ([], false, None)), + None), + Paren + (Typed + (As + (LongIdent + (SynLongIdent ([Even], [], [None]), + None, None, Pats [], None, + (5,10--5,14)), + Named + (SynIdent (x, None), false, None, + (5,18--5,19)), (5,10--5,19)), + LongIdent (SynLongIdent ([int], [], [None])), + (5,10--5,24)), (5,9--5,25)), None, + App + (NonAtomic, false, Ident async, + ComputationExpr + (false, + YieldOrReturn + ((false, true), + Const (Int32 2, (5,43--5,44)), + (5,36--5,44), + { YieldOrReturnKeyword = (5,36--5,42) }), + (5,34--5,46)), (5,28--5,46)), (5,4--6,12), + Yes (5,4--5,46), + { LeadingKeyword = Let (5,4--5,8) + InlineKeyword = None + EqualsRange = Some (5,26--5,27) })], YieldOrReturn ((false, true), Ident x, (6,4--6,12), { YieldOrReturnKeyword = (6,4--6,10) }), diff --git a/tests/service/data/SyntaxTree/SynType/Typed LetBang 20.fs.bsl b/tests/service/data/SyntaxTree/SynType/Typed LetBang 20.fs.bsl index c9d8cdb5267..c456d218c52 100644 --- a/tests/service/data/SyntaxTree/SynType/Typed LetBang 20.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Typed LetBang 20.fs.bsl @@ -9,7 +9,7 @@ ImplFile ComputationExpr (false, LetOrUse - (false, false, + (false, false, true, false, [SynBinding (None, Normal, false, false, [], PreXmlDoc ((4,4), FSharp.Compiler.Xml.XmlDocCollector), @@ -36,27 +36,38 @@ ImplFile { LeadingKeyword = Let (4,4--4,7) InlineKeyword = None EqualsRange = Some (4,23--4,24) })], - LetOrUseBang - (Yes (5,4--5,44), false, true, - Typed - (As - (LongIdent - (SynLongIdent ([Even], [], [None]), None, None, - Pats [], None, (5,9--5,13)), - Named - (SynIdent (x, None), false, None, (5,17--5,18)), - (5,9--5,18)), - LongIdent (SynLongIdent ([int], [], [None])), - (5,9--5,23)), - App - (NonAtomic, false, Ident async, - ComputationExpr - (false, - YieldOrReturn - ((false, true), Const (Int32 2, (5,41--5,42)), - (5,34--5,42), - { YieldOrReturnKeyword = (5,34--5,40) }), - (5,32--5,44)), (5,26--5,44)), [], + LetOrUse + (false, false, true, true, + [SynBinding + (None, Normal, false, false, [], PreXmlDocEmpty, + SynValData + (None, + SynValInfo ([], SynArgInfo ([], false, None)), + None), + Typed + (As + (LongIdent + (SynLongIdent ([Even], [], [None]), None, + None, Pats [], None, (5,9--5,13)), + Named + (SynIdent (x, None), false, None, + (5,17--5,18)), (5,9--5,18)), + LongIdent (SynLongIdent ([int], [], [None])), + (5,9--5,23)), None, + App + (NonAtomic, false, Ident async, + ComputationExpr + (false, + YieldOrReturn + ((false, true), + Const (Int32 2, (5,41--5,42)), + (5,34--5,42), + { YieldOrReturnKeyword = (5,34--5,40) }), + (5,32--5,44)), (5,26--5,44)), (5,4--6,12), + Yes (5,4--5,44), + { LeadingKeyword = Let (5,4--5,8) + InlineKeyword = None + EqualsRange = Some (5,24--5,25) })], YieldOrReturn ((false, true), Ident x, (6,4--6,12), { YieldOrReturnKeyword = (6,4--6,10) }), diff --git a/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 01.fs.bsl b/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 01.fs.bsl index 91fadaaff2b..e024a5f059e 100644 --- a/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 01.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 01.fs.bsl @@ -9,22 +9,32 @@ ImplFile (NonAtomic, false, Ident async, ComputationExpr (false, - LetOrUseBang - (Yes (4,4--4,38), false, true, - Typed - (Named (SynIdent (res, None), false, None, (4,9--4,12)), - LongIdent (SynLongIdent ([int], [], [None])), - (4,9--4,17)), - App - (NonAtomic, false, Ident async, - ComputationExpr - (false, - YieldOrReturn - ((false, true), Const (Int32 1, (4,35--4,36)), - (4,28--4,36), - { YieldOrReturnKeyword = (4,28--4,34) }), - (4,26--4,38)), (4,20--4,38)), + LetOrUse + (false, false, true, true, [SynBinding + (None, Normal, false, false, [], PreXmlDocEmpty, + SynValData + (None, + SynValInfo ([], SynArgInfo ([], false, None)), + None), + Typed + (Named + (SynIdent (res, None), false, None, (4,9--4,12)), + LongIdent (SynLongIdent ([int], [], [None])), + (4,9--4,17)), None, + App + (NonAtomic, false, Ident async, + ComputationExpr + (false, + YieldOrReturn + ((false, true), Const (Int32 1, (4,35--4,36)), + (4,28--4,36), + { YieldOrReturnKeyword = (4,28--4,34) }), + (4,26--4,38)), (4,20--4,38)), (4,4--6,14), + Yes (4,4--4,38), { LeadingKeyword = Let (4,4--4,8) + InlineKeyword = None + EqualsRange = Some (4,18--4,19) }); + SynBinding (None, Normal, false, false, [], PreXmlDocEmpty, SynValData (None, diff --git a/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 02.fs.bsl b/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 02.fs.bsl index f8f8e2aa771..0f48a7eec0a 100644 --- a/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 02.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 02.fs.bsl @@ -9,24 +9,34 @@ ImplFile (NonAtomic, false, Ident async, ComputationExpr (false, - LetOrUseBang - (Yes (4,4--4,40), false, true, - Paren - (Typed - (Named - (SynIdent (res, None), false, None, (4,10--4,13)), - LongIdent (SynLongIdent ([int], [], [None])), - (4,10--4,18)), (4,9--4,19)), - App - (NonAtomic, false, Ident async, - ComputationExpr - (false, - YieldOrReturn - ((false, true), Const (Int32 1, (4,37--4,38)), - (4,30--4,38), - { YieldOrReturnKeyword = (4,30--4,36) }), - (4,28--4,40)), (4,22--4,40)), + LetOrUse + (false, false, true, true, [SynBinding + (None, Normal, false, false, [], PreXmlDocEmpty, + SynValData + (None, + SynValInfo ([], SynArgInfo ([], false, None)), + None), + Paren + (Typed + (Named + (SynIdent (res, None), false, None, + (4,10--4,13)), + LongIdent (SynLongIdent ([int], [], [None])), + (4,10--4,18)), (4,9--4,19)), None, + App + (NonAtomic, false, Ident async, + ComputationExpr + (false, + YieldOrReturn + ((false, true), Const (Int32 1, (4,37--4,38)), + (4,30--4,38), + { YieldOrReturnKeyword = (4,30--4,36) }), + (4,28--4,40)), (4,22--4,40)), (4,4--6,14), + Yes (4,4--4,40), { LeadingKeyword = Let (4,4--4,8) + InlineKeyword = None + EqualsRange = Some (4,20--4,21) }); + SynBinding (None, Normal, false, false, [], PreXmlDocEmpty, SynValData (None, diff --git a/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 03.fs.bsl b/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 03.fs.bsl index d9f62d1ca24..9ce3159e223 100644 --- a/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 03.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 03.fs.bsl @@ -9,25 +9,35 @@ ImplFile (NonAtomic, false, Ident async, ComputationExpr (false, - LetOrUseBang - (Yes (4,4--4,61), false, true, - Paren - (Typed - (Record - ([(([], Name), Some (4,17--4,18), - Named - (SynIdent (name, None), false, None, - (4,19--4,23))); - (([], Age), Some (4,29--4,30), - Named - (SynIdent (age, None), false, None, - (4,31--4,34)))], (4,10--4,36)), - LongIdent (SynLongIdent ([Person], [], [None])), - (4,10--4,44)), (4,9--4,45)), - App - (Atomic, false, Ident asyncPerson, - Const (Unit, (4,59--4,61)), (4,48--4,61)), + LetOrUse + (false, false, true, true, [SynBinding + (None, Normal, false, false, [], PreXmlDocEmpty, + SynValData + (None, + SynValInfo ([], SynArgInfo ([], false, None)), + None), + Paren + (Typed + (Record + ([(([], Name), Some (4,17--4,18), + Named + (SynIdent (name, None), false, None, + (4,19--4,23))); + (([], Age), Some (4,29--4,30), + Named + (SynIdent (age, None), false, None, + (4,31--4,34)))], (4,10--4,36)), + LongIdent (SynLongIdent ([Person], [], [None])), + (4,10--4,44)), (4,9--4,45)), None, + App + (Atomic, false, Ident asyncPerson, + Const (Unit, (4,59--4,61)), (4,48--4,61)), + (4,4--6,15), Yes (4,4--4,61), + { LeadingKeyword = Let (4,4--4,8) + InlineKeyword = None + EqualsRange = Some (4,46--4,47) }); + SynBinding (None, Normal, false, false, [], PreXmlDocEmpty, SynValData (None, diff --git a/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 04.fs.bsl b/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 04.fs.bsl index 17269172956..8f192d0e7f0 100644 --- a/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 04.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 04.fs.bsl @@ -9,24 +9,34 @@ ImplFile (NonAtomic, false, Ident async, ComputationExpr (false, - LetOrUseBang - (Yes (4,4--4,59), false, true, - Typed - (Record - ([(([], Name), Some (4,16--4,17), - Named - (SynIdent (name, None), false, None, - (4,18--4,22))); - (([], Age), Some (4,28--4,29), - Named - (SynIdent (age, None), false, None, - (4,30--4,33)))], (4,9--4,35)), - LongIdent (SynLongIdent ([Person], [], [None])), - (4,9--4,43)), - App - (Atomic, false, Ident asyncPerson, - Const (Unit, (4,57--4,59)), (4,46--4,59)), + LetOrUse + (false, false, true, true, [SynBinding + (None, Normal, false, false, [], PreXmlDocEmpty, + SynValData + (None, + SynValInfo ([], SynArgInfo ([], false, None)), + None), + Typed + (Record + ([(([], Name), Some (4,16--4,17), + Named + (SynIdent (name, None), false, None, + (4,18--4,22))); + (([], Age), Some (4,28--4,29), + Named + (SynIdent (age, None), false, None, + (4,30--4,33)))], (4,9--4,35)), + LongIdent (SynLongIdent ([Person], [], [None])), + (4,9--4,43)), None, + App + (Atomic, false, Ident asyncPerson, + Const (Unit, (4,57--4,59)), (4,46--4,59)), + (4,4--6,15), Yes (4,4--4,59), + { LeadingKeyword = Let (4,4--4,8) + InlineKeyword = None + EqualsRange = Some (4,44--4,45) }); + SynBinding (None, Normal, false, false, [], PreXmlDocEmpty, SynValData (None, diff --git a/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 05.fs.bsl b/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 05.fs.bsl index e6d00ed2168..f1c41fa9742 100644 --- a/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 05.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 05.fs.bsl @@ -9,25 +9,35 @@ ImplFile (NonAtomic, false, Ident async, ComputationExpr (false, - LetOrUseBang - (Yes (4,4--4,61), false, true, - Paren - (Typed - (Record - ([(([], Name), Some (4,17--4,18), - Named - (SynIdent (name, None), false, None, - (4,19--4,23))); - (([], Age), Some (4,29--4,30), - Named - (SynIdent (age, None), false, None, - (4,31--4,34)))], (4,10--4,36)), - LongIdent (SynLongIdent ([Person], [], [None])), - (4,10--4,44)), (4,9--4,45)), - App - (Atomic, false, Ident asyncPerson, - Const (Unit, (4,59--4,61)), (4,48--4,61)), + LetOrUse + (false, false, true, true, [SynBinding + (None, Normal, false, false, [], PreXmlDocEmpty, + SynValData + (None, + SynValInfo ([], SynArgInfo ([], false, None)), + None), + Paren + (Typed + (Record + ([(([], Name), Some (4,17--4,18), + Named + (SynIdent (name, None), false, None, + (4,19--4,23))); + (([], Age), Some (4,29--4,30), + Named + (SynIdent (age, None), false, None, + (4,31--4,34)))], (4,10--4,36)), + LongIdent (SynLongIdent ([Person], [], [None])), + (4,10--4,44)), (4,9--4,45)), None, + App + (Atomic, false, Ident asyncPerson, + Const (Unit, (4,59--4,61)), (4,48--4,61)), + (4,4--6,15), Yes (4,4--4,61), + { LeadingKeyword = Let (4,4--4,8) + InlineKeyword = None + EqualsRange = Some (4,46--4,47) }); + SynBinding (None, Normal, false, false, [], PreXmlDocEmpty, SynValData (None, diff --git a/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 06.fs.bsl b/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 06.fs.bsl index 739587c36e9..0f5bbd75f2e 100644 --- a/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 06.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 06.fs.bsl @@ -9,20 +9,30 @@ ImplFile (NonAtomic, false, Ident async, ComputationExpr (false, - LetOrUseBang - (Yes (4,4--4,38), false, true, - Paren - (LongIdent - (SynLongIdent ([Union], [], [None]), None, None, - Pats - [Named - (SynIdent (value, None), false, None, - (4,16--4,21))], None, (4,10--4,21)), - (4,9--4,22)), - App - (Atomic, false, Ident asyncOption, - Const (Unit, (4,36--4,38)), (4,25--4,38)), + LetOrUse + (false, false, true, true, [SynBinding + (None, Normal, false, false, [], PreXmlDocEmpty, + SynValData + (None, + SynValInfo ([], SynArgInfo ([], false, None)), + None), + Paren + (LongIdent + (SynLongIdent ([Union], [], [None]), None, None, + Pats + [Named + (SynIdent (value, None), false, None, + (4,16--4,21))], None, (4,10--4,21)), + (4,9--4,22)), None, + App + (Atomic, false, Ident asyncOption, + Const (Unit, (4,36--4,38)), (4,25--4,38)), + (4,4--6,25), Yes (4,4--4,38), + { LeadingKeyword = Let (4,4--4,8) + InlineKeyword = None + EqualsRange = Some (4,23--4,24) }); + SynBinding (None, Normal, false, false, [], PreXmlDocEmpty, SynValData (None, diff --git a/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 07.fs.bsl b/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 07.fs.bsl index 6af2b1f92b1..2b1144262b2 100644 --- a/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 07.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 07.fs.bsl @@ -9,18 +9,28 @@ ImplFile (NonAtomic, false, Ident async, ComputationExpr (false, - LetOrUseBang - (Yes (4,4--4,36), false, true, - LongIdent - (SynLongIdent ([Union], [], [None]), None, None, - Pats - [Named - (SynIdent (value, None), false, None, - (4,15--4,20))], None, (4,9--4,20)), - App - (Atomic, false, Ident asyncOption, - Const (Unit, (4,34--4,36)), (4,23--4,36)), + LetOrUse + (false, false, true, true, [SynBinding + (None, Normal, false, false, [], PreXmlDocEmpty, + SynValData + (None, + SynValInfo ([], SynArgInfo ([], false, None)), + None), + LongIdent + (SynLongIdent ([Union], [], [None]), None, None, + Pats + [Named + (SynIdent (value, None), false, None, + (4,15--4,20))], None, (4,9--4,20)), None, + App + (Atomic, false, Ident asyncOption, + Const (Unit, (4,34--4,36)), (4,23--4,36)), + (4,4--6,25), Yes (4,4--4,36), + { LeadingKeyword = Let (4,4--4,8) + InlineKeyword = None + EqualsRange = Some (4,21--4,22) }); + SynBinding (None, Normal, false, false, [], PreXmlDocEmpty, SynValData (None, diff --git a/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 08.fs.bsl b/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 08.fs.bsl index e583ae5852b..a0c25935ceb 100644 --- a/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 08.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 08.fs.bsl @@ -9,26 +9,38 @@ ImplFile (NonAtomic, false, Ident async, ComputationExpr (false, - LetOrUseBang - (Yes (4,4--4,50), false, true, - Typed - (Paren - (LongIdent - (SynLongIdent ([Union], [], [None]), None, None, - Pats - [Named - (SynIdent (value, None), false, None, - (4,16--4,21))], None, (4,10--4,21)), - (4,9--4,22)), - App - (LongIdent (SynLongIdent ([option], [], [None])), - None, - [LongIdent (SynLongIdent ([int], [], [None]))], [], - None, true, (4,24--4,34)), (4,9--4,34)), - App - (Atomic, false, Ident asyncOption, - Const (Unit, (4,48--4,50)), (4,37--4,50)), + LetOrUse + (false, false, true, true, [SynBinding + (None, Normal, false, false, [], PreXmlDocEmpty, + SynValData + (None, + SynValInfo ([], SynArgInfo ([], false, None)), + None), + Typed + (Paren + (LongIdent + (SynLongIdent ([Union], [], [None]), None, + None, + Pats + [Named + (SynIdent (value, None), false, None, + (4,16--4,21))], None, (4,10--4,21)), + (4,9--4,22)), + App + (LongIdent (SynLongIdent ([option], [], [None])), + None, + [LongIdent (SynLongIdent ([int], [], [None]))], + [], None, true, (4,24--4,34)), (4,9--4,34)), + None, + App + (Atomic, false, Ident asyncOption, + Const (Unit, (4,48--4,50)), (4,37--4,50)), + (4,4--6,25), Yes (4,4--4,50), + { LeadingKeyword = Let (4,4--4,8) + InlineKeyword = None + EqualsRange = Some (4,35--4,36) }); + SynBinding (None, Normal, false, false, [], PreXmlDocEmpty, SynValData (None, diff --git a/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 09.fs.bsl b/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 09.fs.bsl index 2ab23d5029c..63d84252605 100644 --- a/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 09.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 09.fs.bsl @@ -9,24 +9,35 @@ ImplFile (NonAtomic, false, Ident async, ComputationExpr (false, - LetOrUseBang - (Yes (4,4--4,48), false, true, - Typed - (LongIdent - (SynLongIdent ([Union], [], [None]), None, None, - Pats - [Named - (SynIdent (value, None), false, None, - (4,15--4,20))], None, (4,9--4,20)), - App - (LongIdent (SynLongIdent ([option], [], [None])), - None, - [LongIdent (SynLongIdent ([int], [], [None]))], [], - None, true, (4,22--4,32)), (4,9--4,32)), - App - (Atomic, false, Ident asyncOption, - Const (Unit, (4,46--4,48)), (4,35--4,48)), + LetOrUse + (false, false, true, true, [SynBinding + (None, Normal, false, false, [], PreXmlDocEmpty, + SynValData + (None, + SynValInfo ([], SynArgInfo ([], false, None)), + None), + Typed + (LongIdent + (SynLongIdent ([Union], [], [None]), None, None, + Pats + [Named + (SynIdent (value, None), false, None, + (4,15--4,20))], None, (4,9--4,20)), + App + (LongIdent (SynLongIdent ([option], [], [None])), + None, + [LongIdent (SynLongIdent ([int], [], [None]))], + [], None, true, (4,22--4,32)), (4,9--4,32)), + None, + App + (Atomic, false, Ident asyncOption, + Const (Unit, (4,46--4,48)), (4,35--4,48)), + (4,4--6,25), Yes (4,4--4,48), + { LeadingKeyword = Let (4,4--4,8) + InlineKeyword = None + EqualsRange = Some (4,33--4,34) }); + SynBinding (None, Normal, false, false, [], PreXmlDocEmpty, SynValData (None, diff --git a/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 10.fs.bsl b/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 10.fs.bsl index 299837318cf..84a3c2c524d 100644 --- a/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 10.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 10.fs.bsl @@ -9,22 +9,33 @@ ImplFile (NonAtomic, false, Ident async, ComputationExpr (false, - LetOrUseBang - (Yes (4,4--4,35), false, true, - Typed - (Paren - (As - (Named - (SynIdent (x, None), false, None, (4,10--4,11)), - Named - (SynIdent (y, None), false, None, (4,15--4,16)), - (4,10--4,16)), (4,9--4,17)), - LongIdent (SynLongIdent ([int], [], [None])), - (4,9--4,22)), - App - (Atomic, false, Ident asyncInt, - Const (Unit, (4,33--4,35)), (4,25--4,35)), + LetOrUse + (false, false, true, true, [SynBinding + (None, Normal, false, false, [], PreXmlDocEmpty, + SynValData + (None, + SynValInfo ([], SynArgInfo ([], false, None)), + None), + Typed + (Paren + (As + (Named + (SynIdent (x, None), false, None, + (4,10--4,11)), + Named + (SynIdent (y, None), false, None, + (4,15--4,16)), (4,10--4,16)), (4,9--4,17)), + LongIdent (SynLongIdent ([int], [], [None])), + (4,9--4,22)), None, + App + (Atomic, false, Ident asyncInt, + Const (Unit, (4,33--4,35)), (4,25--4,35)), + (4,4--6,16), Yes (4,4--4,35), + { LeadingKeyword = Let (4,4--4,8) + InlineKeyword = None + EqualsRange = Some (4,23--4,24) }); + SynBinding (None, Normal, false, false, [], PreXmlDocEmpty, SynValData (None, diff --git a/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 11.fs.bsl b/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 11.fs.bsl index 9ee8fe531ed..f39642c402e 100644 --- a/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 11.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 11.fs.bsl @@ -9,21 +9,31 @@ ImplFile (NonAtomic, false, Ident async, ComputationExpr (false, - LetOrUseBang - (Yes (4,4--4,33), false, true, - Typed - (As - (Named - (SynIdent (x, None), false, None, (4,9--4,10)), - Named - (SynIdent (y, None), false, None, (4,14--4,15)), - (4,9--4,15)), - LongIdent (SynLongIdent ([int], [], [None])), - (4,9--4,20)), - App - (Atomic, false, Ident asyncInt, - Const (Unit, (4,31--4,33)), (4,23--4,33)), + LetOrUse + (false, false, true, true, [SynBinding + (None, Normal, false, false, [], PreXmlDocEmpty, + SynValData + (None, + SynValInfo ([], SynArgInfo ([], false, None)), + None), + Typed + (As + (Named + (SynIdent (x, None), false, None, (4,9--4,10)), + Named + (SynIdent (y, None), false, None, + (4,14--4,15)), (4,9--4,15)), + LongIdent (SynLongIdent ([int], [], [None])), + (4,9--4,20)), None, + App + (Atomic, false, Ident asyncInt, + Const (Unit, (4,31--4,33)), (4,23--4,33)), + (4,4--6,16), Yes (4,4--4,33), + { LeadingKeyword = Let (4,4--4,8) + InlineKeyword = None + EqualsRange = Some (4,21--4,22) }); + SynBinding (None, Normal, false, false, [], PreXmlDocEmpty, SynValData (None, diff --git a/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 12.fs.bsl b/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 12.fs.bsl index 33159e69b1e..70f1a734d25 100644 --- a/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 12.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 12.fs.bsl @@ -9,16 +9,28 @@ ImplFile (NonAtomic, false, Ident async, ComputationExpr (false, - LetOrUseBang - (Yes (4,4--4,28), false, true, - As - (Named (SynIdent (x, None), false, None, (4,9--4,10)), - Named (SynIdent (y, None), false, None, (4,14--4,15)), - (4,9--4,15)), - App - (Atomic, false, Ident asyncInt, - Const (Unit, (4,26--4,28)), (4,18--4,28)), + LetOrUse + (false, false, true, true, [SynBinding + (None, Normal, false, false, [], PreXmlDocEmpty, + SynValData + (None, + SynValInfo ([], SynArgInfo ([], false, None)), + None), + As + (Named + (SynIdent (x, None), false, None, (4,9--4,10)), + Named + (SynIdent (y, None), false, None, (4,14--4,15)), + (4,9--4,15)), None, + App + (Atomic, false, Ident asyncInt, + Const (Unit, (4,26--4,28)), (4,18--4,28)), + (4,4--6,16), Yes (4,4--4,28), + { LeadingKeyword = Let (4,4--4,8) + InlineKeyword = None + EqualsRange = Some (4,16--4,17) }); + SynBinding (None, Normal, false, false, [], PreXmlDocEmpty, SynValData (None, diff --git a/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 13.fs.bsl b/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 13.fs.bsl index 2f10c2e1db3..240084681df 100644 --- a/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 13.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 13.fs.bsl @@ -9,28 +9,39 @@ ImplFile (NonAtomic, false, Ident async, ComputationExpr (false, - LetOrUseBang - (Yes (4,4--4,56), false, true, - Paren - (Typed - (ArrayOrList - (true, - [Named - (SynIdent (first, None), false, None, - (4,13--4,18)); - Named - (SynIdent (second, None), false, None, - (4,20--4,26))], (4,10--4,29)), - App - (LongIdent (SynLongIdent ([array], [], [None])), - None, - [LongIdent (SynLongIdent ([int], [], [None]))], - [], None, true, (4,31--4,40)), (4,10--4,40)), - (4,9--4,41)), - App - (Atomic, false, Ident asyncArray, - Const (Unit, (4,54--4,56)), (4,44--4,56)), + LetOrUse + (false, false, true, true, [SynBinding + (None, Normal, false, false, [], PreXmlDocEmpty, + SynValData + (None, + SynValInfo ([], SynArgInfo ([], false, None)), + None), + Paren + (Typed + (ArrayOrList + (true, + [Named + (SynIdent (first, None), false, None, + (4,13--4,18)); + Named + (SynIdent (second, None), false, None, + (4,20--4,26))], (4,10--4,29)), + App + (LongIdent + (SynLongIdent ([array], [], [None])), None, + [LongIdent + (SynLongIdent ([int], [], [None]))], [], + None, true, (4,31--4,40)), (4,10--4,40)), + (4,9--4,41)), None, + App + (Atomic, false, Ident asyncArray, + Const (Unit, (4,54--4,56)), (4,44--4,56)), + (4,4--6,16), Yes (4,4--4,56), + { LeadingKeyword = Let (4,4--4,8) + InlineKeyword = None + EqualsRange = Some (4,42--4,43) }); + SynBinding (None, Normal, false, false, [], PreXmlDocEmpty, SynValData (None, diff --git a/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 14.fs.bsl b/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 14.fs.bsl index 5260a9c576c..f73d7e3dbfa 100644 --- a/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 14.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 14.fs.bsl @@ -9,26 +9,37 @@ ImplFile (NonAtomic, false, Ident async, ComputationExpr (false, - LetOrUseBang - (Yes (4,4--4,54), false, true, - Typed - (ArrayOrList - (true, - [Named - (SynIdent (first, None), false, None, - (4,12--4,17)); - Named - (SynIdent (second, None), false, None, - (4,19--4,25))], (4,9--4,28)), - App - (LongIdent (SynLongIdent ([array], [], [None])), - None, - [LongIdent (SynLongIdent ([int], [], [None]))], [], - None, true, (4,30--4,39)), (4,9--4,39)), - App - (Atomic, false, Ident asyncArray, - Const (Unit, (4,52--4,54)), (4,42--4,54)), + LetOrUse + (false, false, true, true, [SynBinding + (None, Normal, false, false, [], PreXmlDocEmpty, + SynValData + (None, + SynValInfo ([], SynArgInfo ([], false, None)), + None), + Typed + (ArrayOrList + (true, + [Named + (SynIdent (first, None), false, None, + (4,12--4,17)); + Named + (SynIdent (second, None), false, None, + (4,19--4,25))], (4,9--4,28)), + App + (LongIdent (SynLongIdent ([array], [], [None])), + None, + [LongIdent (SynLongIdent ([int], [], [None]))], + [], None, true, (4,30--4,39)), (4,9--4,39)), + None, + App + (Atomic, false, Ident asyncArray, + Const (Unit, (4,52--4,54)), (4,42--4,54)), + (4,4--6,16), Yes (4,4--4,54), + { LeadingKeyword = Let (4,4--4,8) + InlineKeyword = None + EqualsRange = Some (4,40--4,41) }); + SynBinding (None, Normal, false, false, [], PreXmlDocEmpty, SynValData (None, diff --git a/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 15.fs.bsl b/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 15.fs.bsl index 9fdf1440fc8..9aff0538368 100644 --- a/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 15.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 15.fs.bsl @@ -11,32 +11,42 @@ ImplFile (false, Tuple (false, - [LetOrUseBang - (Yes (4,4--4,39), false, true, - Typed - (Paren - (Tuple - (false, - [Named - (SynIdent (x, None), false, None, - (4,10--4,11)); - Named - (SynIdent (y, None), false, None, - (4,13--4,14))], [(4,11--4,12)], - (4,10--4,14)), (4,9--4,15)), - Tuple - (false, - [Type - (LongIdent - (SynLongIdent ([int], [], [None]))); - Star (4,21--4,22); - Type - (LongIdent - (SynLongIdent ([int], [], [None])))], - (4,17--4,26)), (4,9--4,26)), - App - (Atomic, false, Ident asyncInt, - Const (Unit, (4,37--4,39)), (4,29--4,39)), [], + [LetOrUse + (false, false, true, true, + [SynBinding + (None, Normal, false, false, [], PreXmlDocEmpty, + SynValData + (None, + SynValInfo ([], SynArgInfo ([], false, None)), + None), + Typed + (Paren + (Tuple + (false, + [Named + (SynIdent (x, None), false, None, + (4,10--4,11)); + Named + (SynIdent (y, None), false, None, + (4,13--4,14))], [(4,11--4,12)], + (4,10--4,14)), (4,9--4,15)), + Tuple + (false, + [Type + (LongIdent + (SynLongIdent ([int], [], [None]))); + Star (4,21--4,22); + Type + (LongIdent + (SynLongIdent ([int], [], [None])))], + (4,17--4,26)), (4,9--4,26)), None, + App + (Atomic, false, Ident asyncInt, + Const (Unit, (4,37--4,39)), (4,29--4,39)), + (4,4--5,16), Yes (4,4--4,39), + { LeadingKeyword = Let (4,4--4,8) + InlineKeyword = None + EqualsRange = Some (4,27--4,28) })], ImplicitZero (4,39--4,39), (4,4--5,16), { LetOrUseKeyword = (4,4--4,8) InKeyword = None diff --git a/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 16.fs.bsl b/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 16.fs.bsl index 91acf209739..bb6c4d81f3f 100644 --- a/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 16.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 16.fs.bsl @@ -9,31 +9,43 @@ ImplFile (NonAtomic, false, Ident async, ComputationExpr (false, - LetOrUseBang - (Yes (4,4--4,39), false, true, - Typed - (Paren - (Tuple - (false, - [Named - (SynIdent (x, None), false, None, - (4,10--4,11)); - Named - (SynIdent (y, None), false, None, - (4,13--4,14))], [(4,11--4,12)], (4,10--4,14)), - (4,9--4,15)), - Tuple - (false, - [Type - (LongIdent (SynLongIdent ([int], [], [None]))); - Star (4,21--4,22); - Type - (LongIdent (SynLongIdent ([int], [], [None])))], - (4,17--4,26)), (4,9--4,26)), - App - (Atomic, false, Ident asyncInt, - Const (Unit, (4,37--4,39)), (4,29--4,39)), + LetOrUse + (false, false, true, true, [SynBinding + (None, Normal, false, false, [], PreXmlDocEmpty, + SynValData + (None, + SynValInfo ([], SynArgInfo ([], false, None)), + None), + Typed + (Paren + (Tuple + (false, + [Named + (SynIdent (x, None), false, None, + (4,10--4,11)); + Named + (SynIdent (y, None), false, None, + (4,13--4,14))], [(4,11--4,12)], + (4,10--4,14)), (4,9--4,15)), + Tuple + (false, + [Type + (LongIdent + (SynLongIdent ([int], [], [None]))); + Star (4,21--4,22); + Type + (LongIdent + (SynLongIdent ([int], [], [None])))], + (4,17--4,26)), (4,9--4,26)), None, + App + (Atomic, false, Ident asyncInt, + Const (Unit, (4,37--4,39)), (4,29--4,39)), + (4,4--6,13), Yes (4,4--4,39), + { LeadingKeyword = Let (4,4--4,8) + InlineKeyword = None + EqualsRange = Some (4,27--4,28) }); + SynBinding (None, Normal, false, false, [], PreXmlDocEmpty, SynValData (None, diff --git a/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 17.fs.bsl b/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 17.fs.bsl index f542dca6c09..7fbe916076c 100644 --- a/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 17.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 17.fs.bsl @@ -9,31 +9,43 @@ ImplFile (NonAtomic, false, Ident async, ComputationExpr (false, - LetOrUseBang - (Yes (4,4--4,39), false, true, - Typed - (Paren - (Tuple - (false, - [Named - (SynIdent (x, None), false, None, - (4,10--4,11)); - Named - (SynIdent (y, None), false, None, - (4,13--4,14))], [(4,11--4,12)], (4,10--4,14)), - (4,9--4,15)), - Tuple - (false, - [Type - (LongIdent (SynLongIdent ([int], [], [None]))); - Star (4,21--4,22); - Type - (LongIdent (SynLongIdent ([int], [], [None])))], - (4,17--4,26)), (4,9--4,26)), - App - (Atomic, false, Ident asyncInt, - Const (Unit, (4,37--4,39)), (4,29--4,39)), + LetOrUse + (false, false, true, true, [SynBinding + (None, Normal, false, false, [], PreXmlDocEmpty, + SynValData + (None, + SynValInfo ([], SynArgInfo ([], false, None)), + None), + Typed + (Paren + (Tuple + (false, + [Named + (SynIdent (x, None), false, None, + (4,10--4,11)); + Named + (SynIdent (y, None), false, None, + (4,13--4,14))], [(4,11--4,12)], + (4,10--4,14)), (4,9--4,15)), + Tuple + (false, + [Type + (LongIdent + (SynLongIdent ([int], [], [None]))); + Star (4,21--4,22); + Type + (LongIdent + (SynLongIdent ([int], [], [None])))], + (4,17--4,26)), (4,9--4,26)), None, + App + (Atomic, false, Ident asyncInt, + Const (Unit, (4,37--4,39)), (4,29--4,39)), + (4,4--6,13), Yes (4,4--4,39), + { LeadingKeyword = Let (4,4--4,8) + InlineKeyword = None + EqualsRange = Some (4,27--4,28) }); + SynBinding (None, Normal, false, false, [], PreXmlDocEmpty, SynValData (None, diff --git a/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 18.fs.bsl b/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 18.fs.bsl index e9e4c26a259..98ddd4bb58f 100644 --- a/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 18.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 18.fs.bsl @@ -9,22 +9,33 @@ ImplFile (NonAtomic, false, Ident async, ComputationExpr (false, - LetOrUseBang - (Yes (4,4--4,35), false, true, - Typed - (Paren - (As - (Named - (SynIdent (x, None), false, None, (4,10--4,11)), - Named - (SynIdent (y, None), false, None, (4,15--4,16)), - (4,10--4,16)), (4,9--4,17)), - LongIdent (SynLongIdent ([int], [], [None])), - (4,9--4,22)), - App - (Atomic, false, Ident asyncInt, - Const (Unit, (4,33--4,35)), (4,25--4,35)), + LetOrUse + (false, false, true, true, [SynBinding + (None, Normal, false, false, [], PreXmlDocEmpty, + SynValData + (None, + SynValInfo ([], SynArgInfo ([], false, None)), + None), + Typed + (Paren + (As + (Named + (SynIdent (x, None), false, None, + (4,10--4,11)), + Named + (SynIdent (y, None), false, None, + (4,15--4,16)), (4,10--4,16)), (4,9--4,17)), + LongIdent (SynLongIdent ([int], [], [None])), + (4,9--4,22)), None, + App + (Atomic, false, Ident asyncInt, + Const (Unit, (4,33--4,35)), (4,25--4,35)), + (4,4--6,16), Yes (4,4--4,35), + { LeadingKeyword = Let (4,4--4,8) + InlineKeyword = None + EqualsRange = Some (4,23--4,24) }); + SynBinding (None, Normal, false, false, [], PreXmlDocEmpty, SynValData (None, diff --git a/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 19.fs b/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 19.fs new file mode 100644 index 00000000000..c36c9866340 --- /dev/null +++ b/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 19.fs @@ -0,0 +1,9 @@ +module Module + +async { + let rec a = 3 + and b = 5 + let! a = 3 + and! b = 5 + return () +} \ No newline at end of file diff --git a/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 19.fs.bsl b/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 19.fs.bsl new file mode 100644 index 00000000000..492a611be77 --- /dev/null +++ b/tests/service/data/SyntaxTree/SynType/Typed LetBang AndBang 19.fs.bsl @@ -0,0 +1,81 @@ +ImplFile + (ParsedImplFileInput + ("/root/SynType/Typed LetBang AndBang 19.fs", false, + QualifiedNameOfFile Module, [], + [SynModuleOrNamespace + ([Module], false, NamedModule, + [Expr + (App + (NonAtomic, false, Ident async, + ComputationExpr + (false, + LetOrUse + (true, false, true, false, + [SynBinding + (None, Normal, false, false, [], + PreXmlDoc ((4,4), FSharp.Compiler.Xml.XmlDocCollector), + SynValData + (None, + SynValInfo ([], SynArgInfo ([], false, None)), + None), + Named (SynIdent (a, None), false, None, (4,12--4,13)), + None, Const (Int32 3, (4,16--4,17)), (4,12--4,13), + Yes (4,4--4,17), + { LeadingKeyword = LetRec ((4,4--4,7), (4,8--4,11)) + InlineKeyword = None + EqualsRange = Some (4,14--4,15) }); + SynBinding + (None, Normal, false, false, [], + PreXmlDoc ((5,8), FSharp.Compiler.Xml.XmlDocCollector), + SynValData + (None, + SynValInfo ([], SynArgInfo ([], false, None)), + None), + Named (SynIdent (b, None), false, None, (5,8--5,9)), + None, Const (Int32 5, (5,12--5,13)), (5,8--5,9), + Yes (5,4--5,13), { LeadingKeyword = And (5,4--5,7) + InlineKeyword = None + EqualsRange = Some (5,10--5,11) })], + LetOrUse + (false, false, true, true, + [SynBinding + (None, Normal, false, false, [], PreXmlDocEmpty, + SynValData + (None, + SynValInfo ([], SynArgInfo ([], false, None)), + None), + Named + (SynIdent (a, None), false, None, (6,9--6,10)), + None, Const (Int32 3, (6,13--6,14)), (6,4--8,13), + Yes (6,4--6,14), + { LeadingKeyword = Let (6,4--6,8) + InlineKeyword = None + EqualsRange = Some (6,11--6,12) }); + SynBinding + (None, Normal, false, false, [], PreXmlDocEmpty, + SynValData + (None, + SynValInfo ([], SynArgInfo ([], false, None)), + None), + Named + (SynIdent (b, None), false, None, (7,9--7,10)), + None, Const (Int32 5, (7,13--7,14)), (7,4--7,14), + Yes (7,4--7,14), + { LeadingKeyword = And (7,4--7,8) + InlineKeyword = None + EqualsRange = Some (7,11--7,12) })], + YieldOrReturn + ((false, true), Const (Unit, (8,11--8,13)), + (8,4--8,13), { YieldOrReturnKeyword = (8,4--8,10) }), + (6,4--8,13), { LetOrUseKeyword = (6,4--6,8) + InKeyword = None + EqualsRange = Some (6,11--6,12) }), + (4,4--8,13), { LetOrUseKeyword = (4,4--4,11) + InKeyword = None + EqualsRange = Some (4,14--4,15) }), + (3,6--9,1)), (3,0--9,1)), (3,0--9,1))], + PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, + (1,0--9,1), { LeadingKeyword = Module (1,0--1,6) })], (true, true), + { ConditionalDirectives = [] + WarnDirectives = [] + CodeComments = [] }, set [])) diff --git a/tests/service/data/SyntaxTree/SynType/Typed UseBang 01.fs.bsl b/tests/service/data/SyntaxTree/SynType/Typed UseBang 01.fs.bsl index 68ffa0052e2..962ed71f1f2 100644 --- a/tests/service/data/SyntaxTree/SynType/Typed UseBang 01.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Typed UseBang 01.fs.bsl @@ -8,21 +8,31 @@ ImplFile (NonAtomic, false, Ident async, ComputationExpr (false, - LetOrUseBang - (Yes (4,4--4,38), true, true, - Typed - (Named (SynIdent (res, None), false, None, (4,9--4,12)), - LongIdent (SynLongIdent ([int], [], [None])), - (4,9--4,17)), - App - (NonAtomic, false, Ident async, - ComputationExpr - (false, - YieldOrReturn - ((false, true), Const (Int32 1, (4,35--4,36)), - (4,28--4,36), - { YieldOrReturnKeyword = (4,28--4,34) }), - (4,26--4,38)), (4,20--4,38)), [], + LetOrUse + (false, true, true, true, + [SynBinding + (None, Normal, false, false, [], PreXmlDocEmpty, + SynValData + (None, + SynValInfo ([], SynArgInfo ([], false, None)), + None), + Typed + (Named + (SynIdent (res, None), false, None, (4,9--4,12)), + LongIdent (SynLongIdent ([int], [], [None])), + (4,9--4,17)), None, + App + (NonAtomic, false, Ident async, + ComputationExpr + (false, + YieldOrReturn + ((false, true), Const (Int32 1, (4,35--4,36)), + (4,28--4,36), + { YieldOrReturnKeyword = (4,28--4,34) }), + (4,26--4,38)), (4,20--4,38)), (4,4--5,14), + Yes (4,4--4,38), { LeadingKeyword = Use (4,4--4,8) + InlineKeyword = None + EqualsRange = Some (4,18--4,19) })], YieldOrReturn ((false, true), Ident res, (5,4--5,14), { YieldOrReturnKeyword = (5,4--5,10) }), (4,4--5,14), diff --git a/tests/service/data/SyntaxTree/SynType/Typed UseBang 02.fs.bsl b/tests/service/data/SyntaxTree/SynType/Typed UseBang 02.fs.bsl index d108dbbdb26..3aa1d22feec 100644 --- a/tests/service/data/SyntaxTree/SynType/Typed UseBang 02.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Typed UseBang 02.fs.bsl @@ -8,23 +8,33 @@ ImplFile (NonAtomic, false, Ident async, ComputationExpr (false, - LetOrUseBang - (Yes (4,4--4,40), true, true, - Paren - (Typed - (Named - (SynIdent (res, None), false, None, (4,10--4,13)), - LongIdent (SynLongIdent ([int], [], [None])), - (4,10--4,18)), (4,9--4,19)), - App - (NonAtomic, false, Ident async, - ComputationExpr - (false, - YieldOrReturn - ((false, true), Const (Int32 1, (4,37--4,38)), - (4,30--4,38), - { YieldOrReturnKeyword = (4,30--4,36) }), - (4,28--4,40)), (4,22--4,40)), [], + LetOrUse + (false, true, true, true, + [SynBinding + (None, Normal, false, false, [], PreXmlDocEmpty, + SynValData + (None, + SynValInfo ([], SynArgInfo ([], false, None)), + None), + Paren + (Typed + (Named + (SynIdent (res, None), false, None, + (4,10--4,13)), + LongIdent (SynLongIdent ([int], [], [None])), + (4,10--4,18)), (4,9--4,19)), None, + App + (NonAtomic, false, Ident async, + ComputationExpr + (false, + YieldOrReturn + ((false, true), Const (Int32 1, (4,37--4,38)), + (4,30--4,38), + { YieldOrReturnKeyword = (4,30--4,36) }), + (4,28--4,40)), (4,22--4,40)), (4,4--5,14), + Yes (4,4--4,40), { LeadingKeyword = Use (4,4--4,8) + InlineKeyword = None + EqualsRange = Some (4,20--4,21) })], YieldOrReturn ((false, true), Ident res, (5,4--5,14), { YieldOrReturnKeyword = (5,4--5,10) }), (4,4--5,14), diff --git a/tests/service/data/SyntaxTree/SynType/Typed UseBang 03.fs.bsl b/tests/service/data/SyntaxTree/SynType/Typed UseBang 03.fs.bsl index 7166b37a4b0..73764088bbd 100644 --- a/tests/service/data/SyntaxTree/SynType/Typed UseBang 03.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Typed UseBang 03.fs.bsl @@ -4,35 +4,54 @@ ImplFile [SynModuleOrNamespace ([Module], false, NamedModule, [Expr - (LetOrUseBang - (Yes (3,0--3,31), true, true, - Typed - (Named (SynIdent (x, None), false, None, (3,5--3,6)), - LongIdent (SynLongIdent ([int], [], [None])), (3,5--3,10)), - App - (NonAtomic, false, Ident async, - ComputationExpr - (false, - YieldOrReturn - ((false, true), Const (Int32 1, (3,28--3,29)), - (3,21--3,29), { YieldOrReturnKeyword = (3,21--3,27) }), - (3,19--3,31)), (3,13--3,31)), [], - LetOrUseBang - (Yes (4,0--4,33), true, true, - Paren - (Typed - (Named (SynIdent (y, None), false, None, (4,6--4,7)), - LongIdent (SynLongIdent ([int], [], [None])), - (4,6--4,11)), (4,5--4,12)), - App - (NonAtomic, false, Ident async, - ComputationExpr - (false, - YieldOrReturn - ((false, true), Const (Int32 2, (4,30--4,31)), - (4,23--4,31), - { YieldOrReturnKeyword = (4,23--4,29) }), - (4,21--4,33)), (4,15--4,33)), [], + (LetOrUse + (false, true, true, true, + [SynBinding + (None, Normal, false, false, [], PreXmlDocEmpty, + SynValData + (None, SynValInfo ([], SynArgInfo ([], false, None)), + None), + Typed + (Named (SynIdent (x, None), false, None, (3,5--3,6)), + LongIdent (SynLongIdent ([int], [], [None])), + (3,5--3,10)), None, + App + (NonAtomic, false, Ident async, + ComputationExpr + (false, + YieldOrReturn + ((false, true), Const (Int32 1, (3,28--3,29)), + (3,21--3,29), + { YieldOrReturnKeyword = (3,21--3,27) }), + (3,19--3,31)), (3,13--3,31)), (3,0--4,33), + Yes (3,0--3,31), { LeadingKeyword = Use (3,0--3,4) + InlineKeyword = None + EqualsRange = Some (3,11--3,12) })], + LetOrUse + (false, true, true, true, + [SynBinding + (None, Normal, false, false, [], PreXmlDocEmpty, + SynValData + (None, SynValInfo ([], SynArgInfo ([], false, None)), + None), + Paren + (Typed + (Named + (SynIdent (y, None), false, None, (4,6--4,7)), + LongIdent (SynLongIdent ([int], [], [None])), + (4,6--4,11)), (4,5--4,12)), None, + App + (NonAtomic, false, Ident async, + ComputationExpr + (false, + YieldOrReturn + ((false, true), Const (Int32 2, (4,30--4,31)), + (4,23--4,31), + { YieldOrReturnKeyword = (4,23--4,29) }), + (4,21--4,33)), (4,15--4,33)), (4,0--4,33), + Yes (4,0--4,33), { LeadingKeyword = Use (4,0--4,4) + InlineKeyword = None + EqualsRange = Some (4,13--4,14) })], ImplicitZero (4,33--4,33), (4,0--4,33), { LetOrUseKeyword = (4,0--4,4) InKeyword = None diff --git a/tests/service/data/SyntaxTree/SynType/Typed UseBang 04.fs.bsl b/tests/service/data/SyntaxTree/SynType/Typed UseBang 04.fs.bsl index 6253c5c42c5..641c1a2f992 100644 --- a/tests/service/data/SyntaxTree/SynType/Typed UseBang 04.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Typed UseBang 04.fs.bsl @@ -4,35 +4,53 @@ ImplFile [SynModuleOrNamespace ([Module], false, NamedModule, [Expr - (LetOrUseBang - (Yes (3,0--3,31), true, true, - Typed - (Wild (3,5--3,6), - LongIdent (SynLongIdent ([int], [], [None])), (3,5--3,10)), - App - (NonAtomic, false, Ident async, - ComputationExpr - (false, - YieldOrReturn - ((false, true), Const (Int32 1, (3,28--3,29)), - (3,21--3,29), { YieldOrReturnKeyword = (3,21--3,27) }), - (3,19--3,31)), (3,13--3,31)), [], - LetOrUseBang - (Yes (4,0--4,33), true, true, - Paren - (Typed - (Wild (4,6--4,7), - LongIdent (SynLongIdent ([int], [], [None])), - (4,6--4,11)), (4,5--4,12)), - App - (NonAtomic, false, Ident async, - ComputationExpr - (false, - YieldOrReturn - ((false, true), Const (Int32 2, (4,30--4,31)), - (4,23--4,31), - { YieldOrReturnKeyword = (4,23--4,29) }), - (4,21--4,33)), (4,15--4,33)), [], + (LetOrUse + (false, true, true, true, + [SynBinding + (None, Normal, false, false, [], PreXmlDocEmpty, + SynValData + (None, SynValInfo ([], SynArgInfo ([], false, None)), + None), + Typed + (Wild (3,5--3,6), + LongIdent (SynLongIdent ([int], [], [None])), + (3,5--3,10)), None, + App + (NonAtomic, false, Ident async, + ComputationExpr + (false, + YieldOrReturn + ((false, true), Const (Int32 1, (3,28--3,29)), + (3,21--3,29), + { YieldOrReturnKeyword = (3,21--3,27) }), + (3,19--3,31)), (3,13--3,31)), (3,0--4,33), + Yes (3,0--3,31), { LeadingKeyword = Use (3,0--3,4) + InlineKeyword = None + EqualsRange = Some (3,11--3,12) })], + LetOrUse + (false, true, true, true, + [SynBinding + (None, Normal, false, false, [], PreXmlDocEmpty, + SynValData + (None, SynValInfo ([], SynArgInfo ([], false, None)), + None), + Paren + (Typed + (Wild (4,6--4,7), + LongIdent (SynLongIdent ([int], [], [None])), + (4,6--4,11)), (4,5--4,12)), None, + App + (NonAtomic, false, Ident async, + ComputationExpr + (false, + YieldOrReturn + ((false, true), Const (Int32 2, (4,30--4,31)), + (4,23--4,31), + { YieldOrReturnKeyword = (4,23--4,29) }), + (4,21--4,33)), (4,15--4,33)), (4,0--4,33), + Yes (4,0--4,33), { LeadingKeyword = Use (4,0--4,4) + InlineKeyword = None + EqualsRange = Some (4,13--4,14) })], ImplicitZero (4,33--4,33), (4,0--4,33), { LetOrUseKeyword = (4,0--4,4) InKeyword = None diff --git a/tests/service/data/SyntaxTree/SynType/Typed UseBang 05.fs.bsl b/tests/service/data/SyntaxTree/SynType/Typed UseBang 05.fs.bsl index 02b8514ab6a..4986d9b453c 100644 --- a/tests/service/data/SyntaxTree/SynType/Typed UseBang 05.fs.bsl +++ b/tests/service/data/SyntaxTree/SynType/Typed UseBang 05.fs.bsl @@ -8,20 +8,30 @@ ImplFile (NonAtomic, false, Ident async, ComputationExpr (false, - LetOrUseBang - (Yes (4,4--4,34), true, true, - Typed - (Named (SynIdent (res, None), false, None, (4,9--4,12)), - FromParseError (4,13--4,13), (4,9--4,13)), - App - (NonAtomic, false, Ident async, - ComputationExpr - (false, - YieldOrReturn - ((false, true), Const (Int32 1, (4,31--4,32)), - (4,24--4,32), - { YieldOrReturnKeyword = (4,24--4,30) }), - (4,22--4,34)), (4,16--4,34)), [], + LetOrUse + (false, true, true, true, + [SynBinding + (None, Normal, false, false, [], PreXmlDocEmpty, + SynValData + (None, + SynValInfo ([], SynArgInfo ([], false, None)), + None), + Typed + (Named + (SynIdent (res, None), false, None, (4,9--4,12)), + FromParseError (4,13--4,13), (4,9--4,13)), None, + App + (NonAtomic, false, Ident async, + ComputationExpr + (false, + YieldOrReturn + ((false, true), Const (Int32 1, (4,31--4,32)), + (4,24--4,32), + { YieldOrReturnKeyword = (4,24--4,30) }), + (4,22--4,34)), (4,16--4,34)), (4,4--5,14), + Yes (4,4--4,34), { LeadingKeyword = Use (4,4--4,8) + InlineKeyword = None + EqualsRange = Some (4,14--4,15) })], YieldOrReturn ((false, true), Ident res, (5,4--5,14), { YieldOrReturnKeyword = (5,4--5,10) }), (4,4--5,14),