Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc63ad2d

Browse files
fix backticked idents coloring if they contains dots
1 parent551531a commitc63ad2d

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

‎vsintegration/src/FSharp.Editor/LanguageService/Tokenizer.fs‎

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -610,9 +610,15 @@ module internal Tokenizer =
610610
/// Fix invalid span if it appears to have redundant suffix and prefix.
611611
letfixupSpan(sourceText:SourceText,span:TextSpan):TextSpan=
612612
lettext= sourceText.GetSubText(span).ToString()
613-
match text.LastIndexOf'.'with
614-
|-1|0-> span
615-
| index-> TextSpan(span.Start+ index+1, text.Length- index-1)
613+
// backticked ident
614+
if text.EndsWith"``"then
615+
match text.[..text.Length-3].LastIndexOf"``"with
616+
|-1|0-> span
617+
| index-> TextSpan(span.Start+ index, text.Length- index)
618+
else
619+
match text.LastIndexOf'.'with
620+
|-1|0-> span
621+
| index-> TextSpan(span.Start+ index+1, text.Length- index-1)
616622

617623
letisValidNameForSymbol(lexerSymbolKind:LexerSymbolKind,symbol:FSharpSymbol,name:string):bool=
618624
letdoubleBackTickDelimiter="``"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp