@@ -34,8 +34,6 @@ let mkFlexibleDecimalFormatTypar (g: TcGlobals) m =
3434let mkFlexibleFloatFormatTypar ( g : TcGlobals ) m =
3535 mkFlexibleFormatTypar m [ g.float_ ty; g.float32_ ty; g.decimal_ ty ] g.float_ ty
3636
37- let isDigit c = ( '0' <= c && c <= '9' )
38-
3937type FormatInfoRegister =
4038 { mutable leftJustify : bool
4139 mutable numPrefixIfPos : char option
@@ -117,13 +115,13 @@ let parseFormatStringInternal (m:range) (g: TcGlobals) (context: FormatStringChe
117115 let rec digitsPrecision i =
118116 if i >= len then failwithf " %s " <| FSComp.SR.forBadPrecision()
119117 match fmt.[ i] with
120- | c when isDigit c -> digitsPrecision ( i+ 1 )
118+ | c when System.Char.IsDigit c -> digitsPrecision ( i+ 1 )
121119 | _ -> i
122120
123121 let precision i =
124122 if i >= len then failwithf " %s " <| FSComp.SR.forBadWidth()
125123 match fmt.[ i] with
126- | c when isDigit c -> info.precision <- true ; false , digitsPrecision ( i+ 1 )
124+ | c when System.Char.IsDigit c -> info.precision <- true ; false , digitsPrecision ( i+ 1 )
127125 | '*' -> info.precision <- true ; true ,( i+ 1 )
128126 | _ -> failwithf " %s " <| FSComp.SR.forPrecisionMissingAfterDot()
129127
@@ -136,20 +134,20 @@ let parseFormatStringInternal (m:range) (g: TcGlobals) (context: FormatStringChe
136134 let rec digitsWidthAndPrecision i =
137135 if i >= len then failwithf " %s " <| FSComp.SR.forBadPrecision()
138136 match fmt.[ i] with
139- | c when isDigit c -> digitsWidthAndPrecision ( i+ 1 )
137+ | c when System.Char.IsDigit c -> digitsWidthAndPrecision ( i+ 1 )
140138 | _ -> optionalDotAndPrecision i
141139
142140 let widthAndPrecision i =
143141 if i >= len then failwithf " %s " <| FSComp.SR.forBadPrecision()
144142 match fmt.[ i] with
145- | c when isDigit c -> false , digitsWidthAndPrecision i
143+ | c when System.Char.IsDigit c -> false , digitsWidthAndPrecision i
146144 | '*' -> true , optionalDotAndPrecision ( i+ 1 )
147145 | _ -> false , optionalDotAndPrecision i
148146
149147 let rec digitsPosition n i =
150148 if i >= len then failwithf " %s " <| FSComp.SR.forBadPrecision()
151149 match fmt.[ i] with
152- | c when isDigit c -> digitsPosition ( n* 10 + int c - int '0' ) ( i+ 1 )
150+ | c when System.Char.IsDigit c -> digitsPosition ( n* 10 + int c - int '0' ) ( i+ 1 )
153151 | '$' -> Some n, i+ 1
154152 | _ -> None, i
155153
0 commit comments