Skip to content

Commit

Permalink
ColumndsOfCurrentToken to struct tuple (dotnet#9219)
Browse files Browse the repository at this point in the history
  • Loading branch information
cartermp authored and nosami committed Feb 22, 2021
1 parent 1abfe5e commit b5ab6f1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/fsharp/service/ServiceLexing.fs
Original file line number Diff line number Diff line change
Expand Up @@ -616,15 +616,15 @@ type FSharpLineTokenizer(lexbuf: UnicodeLexing.Lexbuf,
| Some mx when rightp.Line > leftp.Line -> mx
| _ -> rightp.Column
let rightc = rightc - 1
leftc, rightc
struct (leftc, rightc)

// Get the token & position - either from a stack or from the lexer
try
if (tokenStack.Count > 0) then true, tokenStack.Pop()
else
// Choose which lexer entry point to call and call it
let token = LexerStateEncoding.callLexCont lexcontInitial lexargs skip lexbuf
let leftc, rightc = ColumnsOfCurrentToken()
let struct (leftc, rightc) = ColumnsOfCurrentToken()

// Splits tokens like ">." into multiple tokens - this duplicates behavior from the 'lexfilter'
// which cannot be (easily) used from the language service. The rules here are not always valid,
Expand Down

0 comments on commit b5ab6f1

Please sign in to comment.