From 6ed38fcb360a0015828973b1f32cd2ea6b58c6ad Mon Sep 17 00:00:00 2001 From: dawe Date: Thu, 27 Jul 2023 15:21:07 +0200 Subject: [PATCH] Add some more ranges to SynMeasure for tooling support (#15684) * add the range of the caret to SynMeasure.Power * add opRange to SynMeasure.Product and SynMeasure.Divide * update surface bsl files * Update src/Compiler/SyntaxTree/SyntaxTree.fsi Co-authored-by: Tomas Grosup * Update src/Compiler/SyntaxTree/SyntaxTree.fsi Co-authored-by: Tomas Grosup * keep names in sync with fsi * update surface bsl files * rename asteriskRange -> mAsterisk rename slashRange -> mSlash * update surface bsl files --------- Co-authored-by: Tomas Grosup --- src/Compiler/Checking/CheckExpressions.fs | 8 ++++---- src/Compiler/Service/ServiceParsedInputOps.fs | 6 +++--- src/Compiler/SyntaxTree/SyntaxTree.fs | 6 +++--- src/Compiler/SyntaxTree/SyntaxTree.fsi | 6 +++--- src/Compiler/pars.fsy | 18 ++++++++++-------- ...Service.SurfaceArea.netstandard20.debug.bsl | 12 +++++++++--- ...rvice.SurfaceArea.netstandard20.release.bsl | 12 +++++++++--- .../SyntaxTree/Measure/Constant - 04.fs.bsl | 8 ++++---- .../SyntaxTree/Measure/Constant - 05.fs.bsl | 2 +- .../SyntaxTree/Measure/Constant - 06.fs.bsl | 9 +++++---- .../SyntaxTree/Measure/Constant - 07.fs.bsl | 2 +- .../SyntaxTree/Measure/Constant - 08.fs.bsl | 2 +- .../SyntaxTree/Measure/Constant - 09.fs.bsl | 2 +- .../SyntaxTree/Measure/Constant - 10.fs.bsl | 2 +- .../SynMeasureParenHasCorrectRange.fs.bsl | 1 + 15 files changed, 56 insertions(+), 40 deletions(-) diff --git a/src/Compiler/Checking/CheckExpressions.fs b/src/Compiler/Checking/CheckExpressions.fs index 489456fe026..94b5067d00a 100644 --- a/src/Compiler/Checking/CheckExpressions.fs +++ b/src/Compiler/Checking/CheckExpressions.fs @@ -771,13 +771,13 @@ let TcConst (cenv: cenv) (overallTy: TType) m env synConst = | TyparKind.Type -> error(Error(FSComp.SR.tcExpectedUnitOfMeasureNotType(), m)) | TyparKind.Measure -> Measure.Const tcref - | SynMeasure.Power(ms, exponent, _) -> Measure.RationalPower (tcMeasure ms, TcSynRationalConst exponent) - | SynMeasure.Product(ms1, ms2, _) -> Measure.Prod(tcMeasure ms1, tcMeasure ms2) - | SynMeasure.Divide(ms1, (SynMeasure.Seq (_ :: _ :: _, _) as ms2), m) -> + | SynMeasure.Power(measure = ms; power = exponent) -> Measure.RationalPower (tcMeasure ms, TcSynRationalConst exponent) + | SynMeasure.Product(measure1 = ms1; measure2 = ms2) -> Measure.Prod(tcMeasure ms1, tcMeasure ms2) + | SynMeasure.Divide(ms1, _, (SynMeasure.Seq (_ :: _ :: _, _) as ms2), m) -> warning(Error(FSComp.SR.tcImplicitMeasureFollowingSlash(), m)) let factor1 = ms1 |> Option.defaultValue (SynMeasure.One Range.Zero) Measure.Prod(tcMeasure factor1, Measure.Inv (tcMeasure ms2)) - | SynMeasure.Divide(ms1, ms2, _) -> + | SynMeasure.Divide(measure1 = ms1; measure2 = ms2) -> let factor1 = ms1 |> Option.defaultValue (SynMeasure.One Range.Zero) Measure.Prod(tcMeasure factor1, Measure.Inv (tcMeasure ms2)) | SynMeasure.Seq(mss, _) -> ProdMeasures (List.map tcMeasure mss) diff --git a/src/Compiler/Service/ServiceParsedInputOps.fs b/src/Compiler/Service/ServiceParsedInputOps.fs index 0400b9050d0..1d27b67f20a 100644 --- a/src/Compiler/Service/ServiceParsedInputOps.fs +++ b/src/Compiler/Service/ServiceParsedInputOps.fs @@ -1908,16 +1908,16 @@ module ParsedInput = and walkMeasure measure = match measure with - | SynMeasure.Product (m1, m2, _) -> + | SynMeasure.Product (measure1 = m1; measure2 = m2) -> walkMeasure m1 walkMeasure m2 - | SynMeasure.Divide (m1, m2, _) -> + | SynMeasure.Divide (measure1 = m1; measure2 = m2) -> m1 |> Option.iter walkMeasure walkMeasure m2 | SynMeasure.Named (longIdent, _) -> addLongIdent longIdent | SynMeasure.Seq (ms, _) -> List.iter walkMeasure ms | SynMeasure.Paren (m, _) - | SynMeasure.Power (m, _, _) -> walkMeasure m + | SynMeasure.Power (measure = m) -> walkMeasure m | SynMeasure.Var (ty, _) -> walkTypar ty | SynMeasure.One _ | SynMeasure.Anon _ -> () diff --git a/src/Compiler/SyntaxTree/SyntaxTree.fs b/src/Compiler/SyntaxTree/SyntaxTree.fs index 82b07b6edc8..5fd51f66070 100644 --- a/src/Compiler/SyntaxTree/SyntaxTree.fs +++ b/src/Compiler/SyntaxTree/SyntaxTree.fs @@ -174,13 +174,13 @@ type SynMeasure = | Named of longId: LongIdent * range: range - | Product of measure1: SynMeasure * measure2: SynMeasure * range: range + | Product of measure1: SynMeasure * mAsterisk: range * measure2: SynMeasure * range: range | Seq of measures: SynMeasure list * range: range - | Divide of measure1: SynMeasure option * measure2: SynMeasure * range: range + | Divide of measure1: SynMeasure option * mSlash: range * measure2: SynMeasure * range: range - | Power of measure: SynMeasure * power: SynRationalConst * range: range + | Power of measure: SynMeasure * caretRange: range * power: SynRationalConst * range: range | One of range: range diff --git a/src/Compiler/SyntaxTree/SyntaxTree.fsi b/src/Compiler/SyntaxTree/SyntaxTree.fsi index a7bb07fd04b..4e0488e3010 100644 --- a/src/Compiler/SyntaxTree/SyntaxTree.fsi +++ b/src/Compiler/SyntaxTree/SyntaxTree.fsi @@ -187,16 +187,16 @@ type SynMeasure = | Named of longId: LongIdent * range: range /// A product of two units of measure, e.g. 'kg * m' - | Product of measure1: SynMeasure * measure2: SynMeasure * range: range + | Product of measure1: SynMeasure * mAsterisk: range * measure2: SynMeasure * range: range /// A sequence of several units of measure, e.g. 'kg m m' | Seq of measures: SynMeasure list * range: range /// A division of two units of measure, e.g. 'kg / m' - | Divide of measure1: SynMeasure option * measure2: SynMeasure * range: range + | Divide of measure1: SynMeasure option * mSlash: range * measure2: SynMeasure * range: range /// A power of a unit of measure, e.g. 'kg ^ 2' - | Power of measure: SynMeasure * power: SynRationalConst * range: range + | Power of measure: SynMeasure * caretRange: range * power: SynRationalConst * range: range /// The '1' unit of measure | One of range: range diff --git a/src/Compiler/pars.fsy b/src/Compiler/pars.fsy index f633a853247..d22e79fd15d 100644 --- a/src/Compiler/pars.fsy +++ b/src/Compiler/pars.fsy @@ -6268,11 +6268,13 @@ measureTypePower: | measureTypeAtom INFIX_AT_HAT_OP atomicRationalConstant { if $2 <> "^" && $2 <> "^-" then reportParseErrorAt (rhs parseState 2) (FSComp.SR.parsUnexpectedOperatorForUnitOfMeasure()) if $2 = "^-" then - let afterMinus = (rhs parseState 2).EndRange + let mOp = rhs parseState 2 + let afterMinus = mOp.EndRange let beforeMinus = mkRange afterMinus.FileName (mkPos afterMinus.EndLine (afterMinus.EndColumn - 1)) afterMinus.End - let m = unionRanges beforeMinus (rhs parseState 3) // include MINUS in Negate range - SynMeasure.Power($1, SynRationalConst.Negate($3, m), lhs parseState) - else SynMeasure.Power($1, $3, lhs parseState) } + let mNegate = unionRanges beforeMinus (rhs parseState 3) // include MINUS in Negate range + let mCaret = unionRanges mOp.StartRange mNegate.StartRange + SynMeasure.Power($1, mCaret, SynRationalConst.Negate($3, mNegate), lhs parseState) + else SynMeasure.Power($1, rhs parseState 2, $3, lhs parseState) } | INT32 { if fst $1 <> 1 then reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnexpectedIntegerLiteralForUnitOfMeasure()) @@ -6291,16 +6293,16 @@ measureTypeExpr: { SynMeasure.Seq($1, lhs parseState) } | measureTypeExpr STAR measureTypeExpr - { SynMeasure.Product($1, $3, lhs parseState) } + { SynMeasure.Product($1, rhs parseState 2, $3, lhs parseState) } | measureTypeExpr INFIX_STAR_DIV_MOD_OP measureTypeExpr { if $2 <> "*" && $2 <> "/" then reportParseErrorAt (rhs parseState 2) (FSComp.SR.parsUnexpectedOperatorForUnitOfMeasure()) - if $2 = "*" then SynMeasure.Product($1, $3, lhs parseState) - else SynMeasure.Divide(Some $1, $3, lhs parseState) } + if $2 = "*" then SynMeasure.Product($1, rhs parseState 2, $3, lhs parseState) + else SynMeasure.Divide(Some $1, rhs parseState 2, $3, lhs parseState) } | INFIX_STAR_DIV_MOD_OP measureTypeExpr { if $1 <> "/" then reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnexpectedOperatorForUnitOfMeasure()) - SynMeasure.Divide(None, $2, lhs parseState) } + SynMeasure.Divide(None, rhs parseState 1, $2, lhs parseState) } typar: | QUOTE ident 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 f77c699a161..7f07a0f1123 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 @@ -7328,7 +7328,9 @@ FSharp.Compiler.Syntax.SynMeasure+Anon: FSharp.Compiler.Text.Range get_range() FSharp.Compiler.Syntax.SynMeasure+Anon: FSharp.Compiler.Text.Range range FSharp.Compiler.Syntax.SynMeasure+Divide: FSharp.Compiler.Syntax.SynMeasure get_measure2() FSharp.Compiler.Syntax.SynMeasure+Divide: FSharp.Compiler.Syntax.SynMeasure measure2 +FSharp.Compiler.Syntax.SynMeasure+Divide: FSharp.Compiler.Text.Range get_mSlash() FSharp.Compiler.Syntax.SynMeasure+Divide: FSharp.Compiler.Text.Range get_range() +FSharp.Compiler.Syntax.SynMeasure+Divide: FSharp.Compiler.Text.Range mSlash FSharp.Compiler.Syntax.SynMeasure+Divide: FSharp.Compiler.Text.Range range FSharp.Compiler.Syntax.SynMeasure+Divide: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.SynMeasure] get_measure1() FSharp.Compiler.Syntax.SynMeasure+Divide: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.SynMeasure] measure1 @@ -7346,13 +7348,17 @@ FSharp.Compiler.Syntax.SynMeasure+Power: FSharp.Compiler.Syntax.SynMeasure get_m FSharp.Compiler.Syntax.SynMeasure+Power: FSharp.Compiler.Syntax.SynMeasure measure FSharp.Compiler.Syntax.SynMeasure+Power: FSharp.Compiler.Syntax.SynRationalConst get_power() FSharp.Compiler.Syntax.SynMeasure+Power: FSharp.Compiler.Syntax.SynRationalConst power +FSharp.Compiler.Syntax.SynMeasure+Power: FSharp.Compiler.Text.Range caretRange +FSharp.Compiler.Syntax.SynMeasure+Power: FSharp.Compiler.Text.Range get_caretRange() FSharp.Compiler.Syntax.SynMeasure+Power: FSharp.Compiler.Text.Range get_range() FSharp.Compiler.Syntax.SynMeasure+Power: FSharp.Compiler.Text.Range range FSharp.Compiler.Syntax.SynMeasure+Product: FSharp.Compiler.Syntax.SynMeasure get_measure1() FSharp.Compiler.Syntax.SynMeasure+Product: FSharp.Compiler.Syntax.SynMeasure get_measure2() FSharp.Compiler.Syntax.SynMeasure+Product: FSharp.Compiler.Syntax.SynMeasure measure1 FSharp.Compiler.Syntax.SynMeasure+Product: FSharp.Compiler.Syntax.SynMeasure measure2 +FSharp.Compiler.Syntax.SynMeasure+Product: FSharp.Compiler.Text.Range get_mAsterisk() FSharp.Compiler.Syntax.SynMeasure+Product: FSharp.Compiler.Text.Range get_range() +FSharp.Compiler.Syntax.SynMeasure+Product: FSharp.Compiler.Text.Range mAsterisk FSharp.Compiler.Syntax.SynMeasure+Product: FSharp.Compiler.Text.Range range FSharp.Compiler.Syntax.SynMeasure+Seq: FSharp.Compiler.Text.Range get_range() FSharp.Compiler.Syntax.SynMeasure+Seq: FSharp.Compiler.Text.Range range @@ -7390,12 +7396,12 @@ FSharp.Compiler.Syntax.SynMeasure: Boolean get_IsProduct() FSharp.Compiler.Syntax.SynMeasure: Boolean get_IsSeq() FSharp.Compiler.Syntax.SynMeasure: Boolean get_IsVar() FSharp.Compiler.Syntax.SynMeasure: FSharp.Compiler.Syntax.SynMeasure NewAnon(FSharp.Compiler.Text.Range) -FSharp.Compiler.Syntax.SynMeasure: FSharp.Compiler.Syntax.SynMeasure NewDivide(Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.SynMeasure], FSharp.Compiler.Syntax.SynMeasure, FSharp.Compiler.Text.Range) +FSharp.Compiler.Syntax.SynMeasure: FSharp.Compiler.Syntax.SynMeasure NewDivide(Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.SynMeasure], FSharp.Compiler.Text.Range, FSharp.Compiler.Syntax.SynMeasure, FSharp.Compiler.Text.Range) FSharp.Compiler.Syntax.SynMeasure: FSharp.Compiler.Syntax.SynMeasure NewNamed(Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.Ident], FSharp.Compiler.Text.Range) FSharp.Compiler.Syntax.SynMeasure: FSharp.Compiler.Syntax.SynMeasure NewOne(FSharp.Compiler.Text.Range) FSharp.Compiler.Syntax.SynMeasure: FSharp.Compiler.Syntax.SynMeasure NewParen(FSharp.Compiler.Syntax.SynMeasure, FSharp.Compiler.Text.Range) -FSharp.Compiler.Syntax.SynMeasure: FSharp.Compiler.Syntax.SynMeasure NewPower(FSharp.Compiler.Syntax.SynMeasure, FSharp.Compiler.Syntax.SynRationalConst, FSharp.Compiler.Text.Range) -FSharp.Compiler.Syntax.SynMeasure: FSharp.Compiler.Syntax.SynMeasure NewProduct(FSharp.Compiler.Syntax.SynMeasure, FSharp.Compiler.Syntax.SynMeasure, FSharp.Compiler.Text.Range) +FSharp.Compiler.Syntax.SynMeasure: FSharp.Compiler.Syntax.SynMeasure NewPower(FSharp.Compiler.Syntax.SynMeasure, FSharp.Compiler.Text.Range, FSharp.Compiler.Syntax.SynRationalConst, FSharp.Compiler.Text.Range) +FSharp.Compiler.Syntax.SynMeasure: FSharp.Compiler.Syntax.SynMeasure NewProduct(FSharp.Compiler.Syntax.SynMeasure, FSharp.Compiler.Text.Range, FSharp.Compiler.Syntax.SynMeasure, FSharp.Compiler.Text.Range) FSharp.Compiler.Syntax.SynMeasure: FSharp.Compiler.Syntax.SynMeasure NewSeq(Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynMeasure], FSharp.Compiler.Text.Range) FSharp.Compiler.Syntax.SynMeasure: FSharp.Compiler.Syntax.SynMeasure NewVar(FSharp.Compiler.Syntax.SynTypar, FSharp.Compiler.Text.Range) FSharp.Compiler.Syntax.SynMeasure: FSharp.Compiler.Syntax.SynMeasure+Anon 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 f77c699a161..7f07a0f1123 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 @@ -7328,7 +7328,9 @@ FSharp.Compiler.Syntax.SynMeasure+Anon: FSharp.Compiler.Text.Range get_range() FSharp.Compiler.Syntax.SynMeasure+Anon: FSharp.Compiler.Text.Range range FSharp.Compiler.Syntax.SynMeasure+Divide: FSharp.Compiler.Syntax.SynMeasure get_measure2() FSharp.Compiler.Syntax.SynMeasure+Divide: FSharp.Compiler.Syntax.SynMeasure measure2 +FSharp.Compiler.Syntax.SynMeasure+Divide: FSharp.Compiler.Text.Range get_mSlash() FSharp.Compiler.Syntax.SynMeasure+Divide: FSharp.Compiler.Text.Range get_range() +FSharp.Compiler.Syntax.SynMeasure+Divide: FSharp.Compiler.Text.Range mSlash FSharp.Compiler.Syntax.SynMeasure+Divide: FSharp.Compiler.Text.Range range FSharp.Compiler.Syntax.SynMeasure+Divide: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.SynMeasure] get_measure1() FSharp.Compiler.Syntax.SynMeasure+Divide: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.SynMeasure] measure1 @@ -7346,13 +7348,17 @@ FSharp.Compiler.Syntax.SynMeasure+Power: FSharp.Compiler.Syntax.SynMeasure get_m FSharp.Compiler.Syntax.SynMeasure+Power: FSharp.Compiler.Syntax.SynMeasure measure FSharp.Compiler.Syntax.SynMeasure+Power: FSharp.Compiler.Syntax.SynRationalConst get_power() FSharp.Compiler.Syntax.SynMeasure+Power: FSharp.Compiler.Syntax.SynRationalConst power +FSharp.Compiler.Syntax.SynMeasure+Power: FSharp.Compiler.Text.Range caretRange +FSharp.Compiler.Syntax.SynMeasure+Power: FSharp.Compiler.Text.Range get_caretRange() FSharp.Compiler.Syntax.SynMeasure+Power: FSharp.Compiler.Text.Range get_range() FSharp.Compiler.Syntax.SynMeasure+Power: FSharp.Compiler.Text.Range range FSharp.Compiler.Syntax.SynMeasure+Product: FSharp.Compiler.Syntax.SynMeasure get_measure1() FSharp.Compiler.Syntax.SynMeasure+Product: FSharp.Compiler.Syntax.SynMeasure get_measure2() FSharp.Compiler.Syntax.SynMeasure+Product: FSharp.Compiler.Syntax.SynMeasure measure1 FSharp.Compiler.Syntax.SynMeasure+Product: FSharp.Compiler.Syntax.SynMeasure measure2 +FSharp.Compiler.Syntax.SynMeasure+Product: FSharp.Compiler.Text.Range get_mAsterisk() FSharp.Compiler.Syntax.SynMeasure+Product: FSharp.Compiler.Text.Range get_range() +FSharp.Compiler.Syntax.SynMeasure+Product: FSharp.Compiler.Text.Range mAsterisk FSharp.Compiler.Syntax.SynMeasure+Product: FSharp.Compiler.Text.Range range FSharp.Compiler.Syntax.SynMeasure+Seq: FSharp.Compiler.Text.Range get_range() FSharp.Compiler.Syntax.SynMeasure+Seq: FSharp.Compiler.Text.Range range @@ -7390,12 +7396,12 @@ FSharp.Compiler.Syntax.SynMeasure: Boolean get_IsProduct() FSharp.Compiler.Syntax.SynMeasure: Boolean get_IsSeq() FSharp.Compiler.Syntax.SynMeasure: Boolean get_IsVar() FSharp.Compiler.Syntax.SynMeasure: FSharp.Compiler.Syntax.SynMeasure NewAnon(FSharp.Compiler.Text.Range) -FSharp.Compiler.Syntax.SynMeasure: FSharp.Compiler.Syntax.SynMeasure NewDivide(Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.SynMeasure], FSharp.Compiler.Syntax.SynMeasure, FSharp.Compiler.Text.Range) +FSharp.Compiler.Syntax.SynMeasure: FSharp.Compiler.Syntax.SynMeasure NewDivide(Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.SynMeasure], FSharp.Compiler.Text.Range, FSharp.Compiler.Syntax.SynMeasure, FSharp.Compiler.Text.Range) FSharp.Compiler.Syntax.SynMeasure: FSharp.Compiler.Syntax.SynMeasure NewNamed(Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.Ident], FSharp.Compiler.Text.Range) FSharp.Compiler.Syntax.SynMeasure: FSharp.Compiler.Syntax.SynMeasure NewOne(FSharp.Compiler.Text.Range) FSharp.Compiler.Syntax.SynMeasure: FSharp.Compiler.Syntax.SynMeasure NewParen(FSharp.Compiler.Syntax.SynMeasure, FSharp.Compiler.Text.Range) -FSharp.Compiler.Syntax.SynMeasure: FSharp.Compiler.Syntax.SynMeasure NewPower(FSharp.Compiler.Syntax.SynMeasure, FSharp.Compiler.Syntax.SynRationalConst, FSharp.Compiler.Text.Range) -FSharp.Compiler.Syntax.SynMeasure: FSharp.Compiler.Syntax.SynMeasure NewProduct(FSharp.Compiler.Syntax.SynMeasure, FSharp.Compiler.Syntax.SynMeasure, FSharp.Compiler.Text.Range) +FSharp.Compiler.Syntax.SynMeasure: FSharp.Compiler.Syntax.SynMeasure NewPower(FSharp.Compiler.Syntax.SynMeasure, FSharp.Compiler.Text.Range, FSharp.Compiler.Syntax.SynRationalConst, FSharp.Compiler.Text.Range) +FSharp.Compiler.Syntax.SynMeasure: FSharp.Compiler.Syntax.SynMeasure NewProduct(FSharp.Compiler.Syntax.SynMeasure, FSharp.Compiler.Text.Range, FSharp.Compiler.Syntax.SynMeasure, FSharp.Compiler.Text.Range) FSharp.Compiler.Syntax.SynMeasure: FSharp.Compiler.Syntax.SynMeasure NewSeq(Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynMeasure], FSharp.Compiler.Text.Range) FSharp.Compiler.Syntax.SynMeasure: FSharp.Compiler.Syntax.SynMeasure NewVar(FSharp.Compiler.Syntax.SynTypar, FSharp.Compiler.Text.Range) FSharp.Compiler.Syntax.SynMeasure: FSharp.Compiler.Syntax.SynMeasure+Anon diff --git a/tests/service/data/SyntaxTree/Measure/Constant - 04.fs.bsl b/tests/service/data/SyntaxTree/Measure/Constant - 04.fs.bsl index 5e71c013ca3..bf2ab0c3bd3 100644 --- a/tests/service/data/SyntaxTree/Measure/Constant - 04.fs.bsl +++ b/tests/service/data/SyntaxTree/Measure/Constant - 04.fs.bsl @@ -8,10 +8,10 @@ ImplFile (Measure (Int32 23, (3,0--3,2), Divide - (None, Seq ([Named ([cm], (3,4--3,6))], (3,4--3,6)), - (3,3--3,6)), { LessRange = (3,2--3,3) - GreaterRange = (3,6--3,7) }), (3,0--3,7)), - (3,0--3,7))], + (None, (3,3--3,4), + Seq ([Named ([cm], (3,4--3,6))], (3,4--3,6)), (3,3--3,6)), + { LessRange = (3,2--3,3) + GreaterRange = (3,6--3,7) }), (3,0--3,7)), (3,0--3,7))], PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,7), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] diff --git a/tests/service/data/SyntaxTree/Measure/Constant - 05.fs.bsl b/tests/service/data/SyntaxTree/Measure/Constant - 05.fs.bsl index 0ebc88c7f0f..b18f6f4a22f 100644 --- a/tests/service/data/SyntaxTree/Measure/Constant - 05.fs.bsl +++ b/tests/service/data/SyntaxTree/Measure/Constant - 05.fs.bsl @@ -8,7 +8,7 @@ ImplFile (Measure (Int32 42, (3,0--3,2), Divide - (Some (Seq ([One (3,4--3,7)], (3,4--3,7))), + (Some (Seq ([One (3,4--3,7)], (3,4--3,7))), (3,8--3,9), Seq ([Named ([m], (3,10--3,11))], (3,10--3,11)), (3,4--3,11)), { LessRange = (3,2--3,3) GreaterRange = (3,11--3,12) }), diff --git a/tests/service/data/SyntaxTree/Measure/Constant - 06.fs.bsl b/tests/service/data/SyntaxTree/Measure/Constant - 06.fs.bsl index 6496ee9f21a..7d5bac5d2e4 100644 --- a/tests/service/data/SyntaxTree/Measure/Constant - 06.fs.bsl +++ b/tests/service/data/SyntaxTree/Measure/Constant - 06.fs.bsl @@ -9,10 +9,11 @@ ImplFile (Int32 42, (3,0--3,2), Seq ([Power - (Named ([m], (3,3--3,4)), Integer (12345, (3,5--3,10)), - (3,3--3,10))], (3,3--3,10)), - { LessRange = (3,2--3,3) - GreaterRange = (3,10--3,11) }), (3,0--3,11)), (3,0--3,11))], + (Named ([m], (3,3--3,4)), (3,4--3,5), + Integer (12345, (3,5--3,10)), (3,3--3,10))], + (3,3--3,10)), { LessRange = (3,2--3,3) + GreaterRange = (3,10--3,11) }), + (3,0--3,11)), (3,0--3,11))], PreXmlDoc ((1,0), FSharp.Compiler.Xml.XmlDocCollector), [], None, (1,0--3,11), { LeadingKeyword = Module (1,0--1,6) })], (true, true), { ConditionalDirectives = [] diff --git a/tests/service/data/SyntaxTree/Measure/Constant - 07.fs.bsl b/tests/service/data/SyntaxTree/Measure/Constant - 07.fs.bsl index ced6613a288..1485e64fd8c 100644 --- a/tests/service/data/SyntaxTree/Measure/Constant - 07.fs.bsl +++ b/tests/service/data/SyntaxTree/Measure/Constant - 07.fs.bsl @@ -9,7 +9,7 @@ ImplFile (Int32 23, (3,0--3,2), Seq ([Power - (Named ([kg], (3,3--3,5)), + (Named ([kg], (3,3--3,5)), (3,8--3,9), Rational (-12345, (3,21--3,27), 123, (3,28--3,31), (3,21--3,31)), (3,3--3,32))], (3,3--3,32)), diff --git a/tests/service/data/SyntaxTree/Measure/Constant - 08.fs.bsl b/tests/service/data/SyntaxTree/Measure/Constant - 08.fs.bsl index 18466941b28..cdc20a7bbe4 100644 --- a/tests/service/data/SyntaxTree/Measure/Constant - 08.fs.bsl +++ b/tests/service/data/SyntaxTree/Measure/Constant - 08.fs.bsl @@ -9,7 +9,7 @@ ImplFile (Int32 23, (3,0--3,2), Seq ([Power - (Named ([kg], (3,3--3,5)), + (Named ([kg], (3,3--3,5)), (3,5--3,6), Negate (Rational (12345, (3,13--3,18), 123, (3,19--3,22), diff --git a/tests/service/data/SyntaxTree/Measure/Constant - 09.fs.bsl b/tests/service/data/SyntaxTree/Measure/Constant - 09.fs.bsl index 0cd029ea905..83f101df01a 100644 --- a/tests/service/data/SyntaxTree/Measure/Constant - 09.fs.bsl +++ b/tests/service/data/SyntaxTree/Measure/Constant - 09.fs.bsl @@ -9,7 +9,7 @@ ImplFile (Int32 23, (3,0--3,2), Seq ([Power - (Named ([kg], (3,3--3,5)), + (Named ([kg], (3,3--3,5)), (3,5--3,6), Negate (Rational (12345, (3,10--3,15), 123, (3,16--3,19), diff --git a/tests/service/data/SyntaxTree/Measure/Constant - 10.fs.bsl b/tests/service/data/SyntaxTree/Measure/Constant - 10.fs.bsl index b9c978dc067..f6e6b3d7fee 100644 --- a/tests/service/data/SyntaxTree/Measure/Constant - 10.fs.bsl +++ b/tests/service/data/SyntaxTree/Measure/Constant - 10.fs.bsl @@ -9,7 +9,7 @@ ImplFile (Int32 23, (3,0--3,2), Seq ([Power - (Named ([kg], (3,3--3,5)), + (Named ([kg], (3,3--3,5)), (3,5--3,6), Negate (Integer (456, (3,7--3,10)), (3,6--3,10)), (3,3--3,10))], (3,3--3,10)), { LessRange = (3,2--3,3) diff --git a/tests/service/data/SyntaxTree/Measure/SynMeasureParenHasCorrectRange.fs.bsl b/tests/service/data/SyntaxTree/Measure/SynMeasureParenHasCorrectRange.fs.bsl index 49a040624a6..84f544b9146 100644 --- a/tests/service/data/SyntaxTree/Measure/SynMeasureParenHasCorrectRange.fs.bsl +++ b/tests/service/data/SyntaxTree/Measure/SynMeasureParenHasCorrectRange.fs.bsl @@ -10,6 +10,7 @@ ImplFile (UInt32 40u, (2,0--2,3), Divide (Some (Seq ([Named ([hr], (2,4--2,6))], (2,4--2,6))), + (2,7--2,8), Seq ([Paren (Seq