File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -36,11 +36,16 @@ let FilterPredictions (suggestionF:ErrorLogger.Suggestions) (idText:string) =
3636
3737 /// Returns `true` if given string is an operator display name, e.g. ( |>> )
3838 let IsOperatorName ( name : string ) =
39- if not ( name.StartsWithOrdinal( " ( " ) && name.EndsWithOrdinal( " )" )) then
39+ if isNull name || not ( name.StartsWithOrdinal( " ( " ) && name.EndsWithOrdinal( " )" )) then
4040 false
4141 else
42- let name = name.[ 2 .. name.Length - 3 ]
43- name |> Seq.forall ( fun c -> c <> ' ' )
42+ let mutable i = 2
43+ let mutable isOperator = true
44+ while isOperator && i < name.Length - 3 do
45+ if name.[ i] = ' ' then
46+ isOperator <- false
47+ i <- i + 1
48+ isOperator
4449
4550 if allSuggestions.Contains idText then [] else // some other parsing error occurred
4651 let dotIdText = " ." + idText
You can’t perform that action at this time.
0 commit comments