@@ -5,6 +5,8 @@ open System
55open FSharp.Compiler .Text
66open FSharp.Compiler .Syntax
77open FSharp.Compiler .Xml
8+ open FSharp.Compiler .SyntaxTrivia
9+ open FSharp.Compiler .Text .Range
810
911type ParsedImplFileInputRcd = {
1012 File: string
@@ -62,19 +64,18 @@ type SynComponentInfo with
6264
6365type SynTypeDefnRcd = {
6466 Info: SynComponentInfoRcd
65- EqualsRange: Range option
6667 Repr: SynTypeDefnRepr
6768 Members: SynMemberDefns
6869 ImplicitConstructor: SynMemberDefn option
6970 Range: range }
7071with
7172 member x.FromRcd =
72- SynTypeDefn( x.Info.FromRcd, x.EqualsRange , x. Repr, x.Members, x.ImplicitConstructor, x.Range)
73+ SynTypeDefn( x.Info.FromRcd, x.Repr, x.Members, x.ImplicitConstructor, x.Range, SynTypeDefnTrivia.Zero )
7374
7475type SynTypeDefn with
7576 member x.ToRcd =
76- let ( SynTypeDefn ( info , equalsRange , repr , members , implicitConstructor , range )) = x
77- { Info = info.ToRcd; EqualsRange = equalsRange ; Repr = repr; Members = members; ImplicitConstructor = implicitConstructor; Range = range }
77+ let ( SynTypeDefn ( info , repr , members , implicitConstructor , range , _ )) = x
78+ { Info = info.ToRcd; Repr = repr; Members = members; ImplicitConstructor = implicitConstructor; Range = range }
7879
7980type SynTypeDefnReprObjectModelRcd = {
8081 Kind: SynTypeDefnKind
@@ -287,7 +288,7 @@ and SynPatNullRcd with
287288and SynPatOptionalValRcd with
288289 member x.FromRcd = SynPat.OptionalVal( x.Id, x.Range)
289290and SynPatOrRcd with
290- member x.FromRcd = SynPat.Or( x.Left.FromRcd, x.Right.FromRcd, x.Range)
291+ member x.FromRcd = SynPat.Or( x.Left.FromRcd, x.Right.FromRcd, x.Range, { BarRange = range0 } )
291292and SynPatAndsRcd with
292293 member x.FromRcd = SynPat.Ands( x.Patterns |> List.map ( fun pat -> pat.FromRcd), x.Range)
293294and SynPatArrayOrListRcd with
@@ -319,7 +320,7 @@ type SynPat with
319320 SynPatRcd.Typed { Pattern = pattern.ToRcd; Type = typ; Range = range }
320321 | SynPat.Attrib( pattern, attributes, range) ->
321322 SynPatRcd.Attrib { Pattern = pattern.ToRcd; Attributes = attributes; Range = range }
322- | SynPat.Or( left, right, range) ->
323+ | SynPat.Or( left, right, range, _ ) ->
323324 SynPatRcd.Or { Left = left.ToRcd; Right = right.ToRcd; Range = range }
324325 | SynPat.Ands( patterns, range) ->
325326 SynPatRcd.Ands { Patterns = patterns |> List.map ( fun pat -> pat.ToRcd); Range = range }
@@ -408,18 +409,17 @@ type SynBindingRcd = {
408409 ValData: SynValData
409410 Pattern: SynPatRcd
410411 ReturnInfo: SynBindingReturnInfoRcd option
411- EqualsRange: Range option
412412 Expr: SynExpr
413413 Range: range
414414 Bind: DebugPointAtBinding }
415415with
416416 member x.FromRcd =
417- SynBinding( x.Access, x.Kind, x.IsInline, x.IsMutable, x.Attributes, x.XmlDoc, x.ValData, x.Pattern.FromRcd, x.ReturnInfo |> Option.map ( fun ri -> ri.FromRcd), x.EqualsRange , x. Expr, x.Range, x.Bind)
417+ SynBinding( x.Access, x.Kind, x.IsInline, x.IsMutable, x.Attributes, x.XmlDoc, x.ValData, x.Pattern.FromRcd, x.ReturnInfo |> Option.map ( fun ri -> ri.FromRcd), x.Expr, x.Range, x.Bind, SynBindingTrivia.Zero )
418418
419419type SynBinding with
420420 member x.ToRcd =
421- let ( SynBinding ( access , kind , isInline , isMutable , attrs , xmlDoc , info , pattern , returnInfo , equalsRange , rhsExpr , mBind , spBind )) = x
422- { Access = access; Kind = kind; IsInline = isInline; IsMutable = isMutable; Attributes = attrs; XmlDoc = xmlDoc; ValData = info; Pattern = pattern.ToRcd; ReturnInfo = returnInfo |> Option.map ( fun ri -> ri.ToRcd); EqualsRange = equalsRange ; Expr = rhsExpr; Range = mBind; Bind = spBind }
421+ let ( SynBinding ( access , kind , isInline , isMutable , attrs , xmlDoc , info , pattern , returnInfo , rhsExpr , mBind , spBind , _ )) = x
422+ { Access = access; Kind = kind; IsInline = isInline; IsMutable = isMutable; Attributes = attrs; XmlDoc = xmlDoc; ValData = info; Pattern = pattern.ToRcd; ReturnInfo = returnInfo |> Option.map ( fun ri -> ri.ToRcd); Expr = rhsExpr; Range = mBind; Bind = spBind }
423423
424424[<RequireQualifiedAccess>]
425425type SynTypeDefnSimpleReprRcd =
@@ -515,20 +515,19 @@ type SynTypeDefnSimpleRepr with
515515type SynEnumCaseRcd = {
516516 Attributes: SynAttributes
517517 Id: Ident
518- EqualsRange: Range
519518 Constant: SynConst
520519 ValueRange: Range
521520 XmlDoc: PreXmlDoc
522521 Range: range }
523522with
524523 member x.FromRcd =
525- SynEnumCase( x.Attributes, x.Id, x.EqualsRange , x. Constant, x.ValueRange, x.XmlDoc, x.Range)
524+ SynEnumCase( x.Attributes, x.Id, x.Constant, x.ValueRange, x.XmlDoc, x.Range, { BarRange = None ; EqualsRange = range0 } )
526525
527526type SynEnumCase with
528527 member x.ToRcd =
529528 match x with
530- | SynEnumCase( attributes, id, equalsRange , constant, valueRange, xmlDoc, range) ->
531- { Attributes = attributes; Id = id; EqualsRange = equalsRange ; Constant = constant; ValueRange = valueRange; XmlDoc = xmlDoc; Range = range }
529+ | SynEnumCase( attributes, id, constant, valueRange, xmlDoc, range, _ ) ->
530+ { Attributes = attributes; Id = id; Constant = constant; ValueRange = valueRange; XmlDoc = xmlDoc; Range = range }
532531
533532type XmlDoc with
534533 member x.Lines =
@@ -547,7 +546,7 @@ type SynUnionCaseRcd = {
547546 Range: range }
548547with
549548 member x.FromRcd =
550- SynUnionCase( x.Attributes, x.Id, x.Type, x.XmlDoc, x.Access, x.Range)
549+ SynUnionCase( x.Attributes, x.Id, x.Type, x.XmlDoc, x.Access, x.Range, { BarRange = None } )
551550 member x.HasFields =
552551 match x.Type with
553552 | SynUnionCaseKind.Fields cases -> not cases.IsEmpty
556555type SynUnionCase with
557556 member x.ToRcd : SynUnionCaseRcd =
558557 match x with
559- | SynUnionCase( attributes, id, typ, xmlDoc, access, range) ->
558+ | SynUnionCase( attributes, id, typ, xmlDoc, access, range, _ ) ->
560559 { Attributes = attributes; Id = id; Type = typ; XmlDoc = xmlDoc; Access = access; Range = range }
561560
562561type SynFieldRcd = {
0 commit comments