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

Commit28db4f7

Browse files
committed
fix '*' and '^' operator coloring
1 parenta019ab1 commit28db4f7

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

‎src/fsharp/vs/service.fs‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -502,6 +502,7 @@ type SemanticClassificationType =
502502
| Enumeration
503503
| Interface
504504
| TypeArgument
505+
| Operator
505506

506507
// A scope represents everything we get back from the typecheck of a file.
507508
// It acts like an in-memory database about the file.
@@ -1466,9 +1467,9 @@ type TypeCheckInfo
14661467
| CNR(_,(Item.Value vref),_,_,_,_, m)when isFunction g vref.Type->
14671468
if vref.IsPropertyGetterMethod|| vref.IsPropertySetterMethodthen
14681469
Some(m, SemanticClassificationType.Property)
1469-
elifnot(IsOperatorName vref.DisplayName)then
1470-
Some(m, SemanticClassificationType.Function)
1471-
elseNone
1470+
elif IsOperatorName vref.DisplayNamethen
1471+
Some(m, SemanticClassificationType.Operator)
1472+
else Some(m, SemanticClassificationType.Function)
14721473
| CNR(_,(Item.Value vref),_,_,_,_, m)when vref.IsMutable->
14731474
Some(m, SemanticClassificationType.MutableVar)
14741475
// todo here we should check if a `vref` is of type `ref`1`

‎src/fsharp/vs/service.fsi‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ type internal SemanticClassificationType =
163163
| Enumeration
164164
| Interface
165165
| TypeArgument
166+
| Operator
166167

167168
/// A handle to the results of CheckFileInProject.
168169
[<Sealed>]

‎src/utils/sformat.fs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ namespace Microsoft.FSharp.Text.StructuredFormat
194194
moduleTaggedTextOps=
195195
#endif
196196
lettagAlias= TaggedText.Alias
197-
letkeywordFunctions=set["raise";"reraise";"typeof";"typedefof";"sizeof";"nameof"]
197+
letkeywordFunctions=Set.ofList["raise";"reraise";"typeof";"typedefof";"sizeof";"nameof"]
198198
lettagClass= TaggedText.Class
199199
lettagUnionCase= TaggedText.UnionCase
200200
lettagDelegate= TaggedText.Delegate
@@ -209,7 +209,7 @@ namespace Microsoft.FSharp.Text.StructuredFormat
209209
lettagRecordField= TaggedText.RecordField
210210
lettagMethod= TaggedText.Method
211211
lettagModule= TaggedText.Module
212-
lettagModuleBinding name=ifkeywordFunctions.Contains namethen TaggedText.Keyword nameelse TaggedText.ModuleBinding name
212+
lettagModuleBinding name=ifSet.contains name keywordFunctionsthen TaggedText.Keyword nameelse TaggedText.ModuleBinding name
213213
lettagNamespace= TaggedText.Namespace
214214
lettagNumericLiteral= TaggedText.NumericLiteral
215215
lettagOperator= TaggedText.Operator

‎vsintegration/src/FSharp.Editor/Classification/ClassificationDefinitions.fs‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ module internal FSharpClassificationTypes =
2626
let [<Literal>]Property="FSharp.Property"
2727
let [<Literal>]Interface= ClassificationTypeNames.InterfaceName
2828
let [<Literal>]TypeArgument= ClassificationTypeNames.TypeParameterName
29+
let [<Literal>]Operator= ClassificationTypeNames.Operator
2930

3031
letgetClassificationTypeName=function
3132
| SemanticClassificationType.ReferenceType-> ReferenceType
@@ -41,6 +42,7 @@ module internal FSharpClassificationTypes =
4142
| SemanticClassificationType.Property-> Property
4243
| SemanticClassificationType.Interface-> Interface
4344
| SemanticClassificationType.TypeArgument-> TypeArgument
45+
| SemanticClassificationType.Operator-> Operator
4446

4547
moduleinternalClassificationDefinitions=
4648
[<Export; Name(FSharpClassificationTypes.Function); BaseDefinition(PredefinedClassificationTypeNames.FormalLanguage)>]

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp