Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ColumnsOfCurrentToken to struct tuple in ServiceLexing #9219

Merged
merged 1 commit into from
May 26, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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