diff --git a/docs/fcs/typedtree.fsx b/docs/fcs/typedtree.fsx index 65782a4b9df5078d1acddda34ebad02703e59866..e49a92385a0f8da293135f33711fe4ebf16c650b 100644 --- a/docs/fcs/typedtree.fsx +++ b/docs/fcs/typedtree.fsx @@ -189,7 +189,7 @@ let rec visitExpr f (e:FSharpExpr) = visitObjArg f objExprOpt; visitExprs f argExprs | FSharpExprPatterns.Coerce(targetType, inpExpr) -> visitExpr f inpExpr - | FSharpExprPatterns.FastIntegerForLoop(startExpr, limitExpr, consumeExpr, isUp) -> + | FSharpExprPatterns.FastIntegerForLoop(startExpr, limitExpr, consumeExpr, isUp, _, _) -> visitExpr f startExpr; visitExpr f limitExpr; visitExpr f consumeExpr | FSharpExprPatterns.ILAsm(asmCode, typeArgs, argExprs) -> visitExprs f argExprs @@ -201,10 +201,11 @@ let rec visitExpr f (e:FSharpExpr) = visitExpr f guardExpr; visitExpr f thenExpr; visitExpr f elseExpr | FSharpExprPatterns.Lambda(lambdaVar, bodyExpr) -> visitExpr f bodyExpr - | FSharpExprPatterns.Let((bindingVar, bindingExpr), bodyExpr) -> + | FSharpExprPatterns.Let((bindingVar, bindingExpr, dbg), bodyExpr) -> visitExpr f bindingExpr; visitExpr f bodyExpr - | FSharpExprPatterns.LetRec(recursiveBindings, bodyExpr) -> - List.iter (snd >> visitExpr f) recursiveBindings; visitExpr f bodyExpr + | FSharpExprPatterns.LetRec(recursiveBindings, bodyExpr) -> + for _,bindingExpr,_ in recursiveBindings do visitExpr f bindingExpr + visitExpr f bodyExpr | FSharpExprPatterns.NewArray(arrayType, argExprs) -> visitExprs f argExprs | FSharpExprPatterns.NewDelegate(delegateType, delegateBodyExpr) -> @@ -229,9 +230,9 @@ let rec visitExpr f (e:FSharpExpr) = visitObjArg f objExprOpt; visitExpr f argExpr | FSharpExprPatterns.Sequential(firstExpr, secondExpr) -> visitExpr f firstExpr; visitExpr f secondExpr - | FSharpExprPatterns.TryFinally(bodyExpr, finalizeExpr) -> + | FSharpExprPatterns.TryFinally(bodyExpr, finalizeExpr, dbgTry, dbgFinally) -> visitExpr f bodyExpr; visitExpr f finalizeExpr - | FSharpExprPatterns.TryWith(bodyExpr, _, _, catchVar, catchExpr) -> + | FSharpExprPatterns.TryWith(bodyExpr, _, _, catchVar, catchExpr, dbgTry, dbgWith) -> visitExpr f bodyExpr; visitExpr f catchExpr | FSharpExprPatterns.TupleGet(tupleType, tupleElemIndex, tupleExpr) -> visitExpr f tupleExpr @@ -259,7 +260,7 @@ let rec visitExpr f (e:FSharpExpr) = visitExprs f argExprs | FSharpExprPatterns.ValueSet(valToSet, valueExpr) -> visitExpr f valueExpr - | FSharpExprPatterns.WhileLoop(guardExpr, bodyExpr) -> + | FSharpExprPatterns.WhileLoop(guardExpr, bodyExpr, dbg) -> visitExpr f guardExpr; visitExpr f bodyExpr | FSharpExprPatterns.BaseValue baseType -> () | FSharpExprPatterns.DefaultValue defaultType -> () diff --git a/docs/fcs/untypedtree.fsx b/docs/fcs/untypedtree.fsx index dc05d875239d32cd793be92a82548661e7d99bca..f53d69692fd96ce6f8f5eb79e2e8526087e2044c 100644 --- a/docs/fcs/untypedtree.fsx +++ b/docs/fcs/untypedtree.fsx @@ -115,7 +115,7 @@ let rec visitPattern = function printfn " .. underscore pattern" | SynPat.Named(name, _, _, _) -> printfn " .. named as '%s'" name.idText - | SynPat.LongIdent(LongIdentWithDots(ident, _), _, _, _, _, _) -> + | SynPat.LongIdent(LongIdentWithDots(ident, _), _, _, _, _, _, _) -> let names = String.concat "." [ for i in ident -> i.idText ] printfn " .. identifier: %s" names | pat -> printfn " .. other pattern: %A" pat @@ -140,12 +140,14 @@ let rec visitExpression e = visitExpression trueBranch falseBranchOpt |> Option.iter visitExpression - | SynExpr.LetOrUse(_, _, bindings, body, _) -> + | SynExpr.LetOrUse(_, _, bindings, body, _, _) -> // Visit bindings (there may be multiple // for 'let .. = .. and .. = .. in ...' printfn "LetOrUse with the following bindings:" for binding in bindings do - let (SynBinding(access, kind, isInline, isMutable, attrs, xmlDoc, data, headPat, retInfo, equalsRange, init, m, debugPoint)) = binding + let (SynBinding( + access, kind, isInline, isMutable, attrs, xmlDoc, data, + headPat, retInfo, init, equalsRange, debugPoint, trivia)) = binding visitPattern headPat visitExpression init // Visit the body expression @@ -175,8 +177,9 @@ let visitDeclarations decls = // Let binding as a declaration is similar to let binding // as an expression (in visitExpression), but has no body for binding in bindings do - let (SynBinding(access, kind, isInline, isMutable, attrs, xmlDoc, - valData, pat, retInfo, equalsRange, body, m, sp)) = binding + let (SynBinding( + access, kind, isInline, isMutable, attrs, xmlDoc, + valData, pat, retInfo, body, equalsRange, debugPoint, trivia)) = binding visitPattern pat visitExpression body | _ -> printfn " - not supported declaration: %A" declaration @@ -191,7 +194,7 @@ with multiple `namespace Foo` declarations: /// does not explicitly define it.. let visitModulesAndNamespaces modulesOrNss = for moduleOrNs in modulesOrNss do - let (SynModuleOrNamespace(lid, isRec, isMod, decls, xml, attrs, _, m)) = moduleOrNs + let (SynModuleOrNamespace(lid, isRec, isMod, decls, xml, attrs, accessibility, range)) = moduleOrNs printfn "Namespace or module: %A" lid visitDeclarations decls (** @@ -235,7 +238,7 @@ in the previous step: match tree with | ParsedInput.ImplFile(implFile) -> // Extract declarations and walk over them - let (ParsedImplFileInput(fn, script, name, _, _, modules, _)) = implFile + let (ParsedImplFileInput(fn, script, name, _, _, modules, _, _)) = implFile visitModulesAndNamespaces modules | _ -> failwith "F# Interface file (*.fsi) not supported." (**