@@ -41,18 +41,6 @@ type internal SymbolLookupKind =
4141| ByRightColumn
4242| ByLongIdent
4343
44- [<RequireQualifiedAccess>]
45- module Option =
46- /// Gets the value associated with the option or the supplied default value.
47- let inline getOrElse v = function
48- | Some x-> x| None-> v
49-
50- /// Gets the option if Some x, otherwise try to get another value
51- let inline orTry f =
52- function
53- | Some x-> Some x
54- | None-> f()
55-
5644module internal CommonHelpers =
5745type private SourceLineData ( lineStart : int , lexStateAtStartOfLine : FSharpTokenizerLexState , lexStateAtEndOfLine : FSharpTokenizerLexState ,
5846 hashCode: int, classifiedSpans: IReadOnlyList< ClassifiedSpan>, tokens: FSharpTokenInfo list) =
@@ -318,7 +306,7 @@ module internal CommonHelpers =
318306| LexerSymbolKind.GenericTypeParameter
319307| LexerSymbolKind.StaticallyResolvedTypeParameter-> true
320308| _ -> false )
321- |> Option.orTry ( fun _ -> tokensUnderCursor|> List.tryFind( fun {DraftToken.Kind =k }-> k= LexerSymbolKind.Operator))
309+ |> Option.orElseWith ( fun _ -> tokensUnderCursor|> List.tryFind( fun {DraftToken.Kind =k }-> k= LexerSymbolKind.Operator))
322310|> Option.map( fun token ->
323311{ Kind= token.Kind
324312 Line= linePos.Line