Skip to content

Commit 1e11442

Browse files
cartermpbaronfel
authored andcommitted
Replace FSComp invocations in VS tooling with an FCS API (#6904)
1 parent 1dd2c59 commit 1e11442

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information.
2+
3+
namespace FSharp.Compiler.SourceCodeServices
4+
5+
type DiagnosticKind =
6+
| AddIndexerDot
7+
| ReplaceWithSuggestion of suggestion:string
8+
9+
[<RequireQualifiedAccess>]
10+
module CompilerDiagnostics =
11+
let getErrorMessage diagnosticKind =
12+
match diagnosticKind with
13+
| AddIndexerDot -> FSComp.SR.addIndexerDot()
14+
| ReplaceWithSuggestion s -> FSComp.SR.replaceWithSuggestion(s)
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information.
2+
3+
namespace FSharp.Compiler.SourceCodeServices
4+
5+
/// Supported kinds of diagnostics by this service.
6+
type DiagnosticKind =
7+
| AddIndexerDot
8+
| ReplaceWithSuggestion of suggestion:string
9+
10+
/// Exposes compiler diagnostic error messages.
11+
module CompilerDiagnostics =
12+
/// Given a DiagnosticKind, returns the string representing the error message for that diagnostic.
13+
val getErrorMessage: diagnosticKind: DiagnosticKind -> string

0 commit comments

Comments
 (0)