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

Commitbe7a935

Browse files
smoothdeveloperKevinRansom
authored andcommitted
escape member which needs backtick in the completion list (#2649)
* escape member which needs backtick in the completion list* code review formatting
1 parent76d28e8 commitbe7a935

File tree

1 file changed

+30
-9
lines changed

1 file changed

+30
-9
lines changed

‎src/fsharp/vs/ServiceDeclarations.fs‎

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1365,8 +1365,18 @@ type FSharpAccessibility(a:Accessibility, ?isProtected) =
13651365

13661366
/// An intellisense declaration
13671367
[<Sealed>]
1368-
typeFSharpDeclarationListItem(name: string,nameInCode: string,fullName: string,glyph: FSharpGlyph,info,isAttribute: bool,accessibility: FSharpAccessibility option,
1369-
kind: CompletionItemKind, isOwnMember: bool, priority: int)=
1368+
typeFSharpDeclarationListItem
1369+
( name: string,
1370+
nameInCode: string,
1371+
fullName: string,
1372+
glyph: FSharpGlyph,
1373+
info,
1374+
isAttribute: bool,
1375+
accessibility: FSharpAccessibility option,
1376+
kind: CompletionItemKind,
1377+
isOwnMember: bool,
1378+
priority: int
1379+
)=
13701380

13711381
let mutabledescriptionTextHolder:FSharpToolTipText<_>option= None
13721382
let mutabletask=null
@@ -1493,23 +1503,34 @@ type FSharpDeclarationListInfo(declarations: FSharpDeclarationListItem[]) =
14931503

14941504
letdecls=
14951505
// Filter out duplicate names
1496-
items|> List.map(fun(nm,itemsWithSameName)->
1506+
items|> List.map(fun(name,itemsWithSameName)->
14971507
match itemsWithSameNamewith
14981508
|[]-> failwith"Unexpected empty bag"
14991509
| item::_as items->
15001510
letglyph= ItemDescriptionsImpl.GlyphOfItem(denv, item.Item)
15011511
letname,nameInCode=
1502-
ifnm.StartsWith"("&&nm.EndsWith" )"then
1503-
letcleanName=nm.[2..nm.Length-3]
1512+
ifname.StartsWith"("&&name.EndsWith" )"then
1513+
letcleanName=name.[2..name.Length-3]
15041514
cleanName,
1505-
if IsOperatorName nmthen cleanNameelse"``"+ cleanName+"``"
1506-
else nm, nm
1515+
if IsOperatorName namethen cleanNameelse"``"+ cleanName+"``"
1516+
else
1517+
name, Lexhelp.Keywords.QuoteIdentifierIfNeeded name
15071518

15081519
letfullName= ItemDescriptionsImpl.FullNameOfItem g item.Item
15091520

15101521
FSharpDeclarationListItem(
1511-
name, nameInCode, fullName, glyph, Choice1Of2(items, infoReader, m, denv, reactor, checkAlive),
1512-
ItemDescriptionsImpl.IsAttribute infoReader item.Item, getAccessibility item.Item, item.Kind, item.IsOwnMember, item.MinorPriority))
1522+
name,
1523+
nameInCode,
1524+
fullName,
1525+
glyph,
1526+
Choice1Of2(items, infoReader, m, denv, reactor, checkAlive),
1527+
ItemDescriptionsImpl.IsAttribute infoReader item.Item,
1528+
getAccessibility item.Item,
1529+
item.Kind,
1530+
item.IsOwnMember,
1531+
item.MinorPriority
1532+
)
1533+
)
15131534

15141535
new FSharpDeclarationListInfo(Array.ofList decls)
15151536

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp